Fix count property in zigbeedevicesproxy
This commit is contained in:
parent
eb421ce059
commit
deec845ff0
@ -31,6 +31,7 @@
|
||||
#include "zigbeemanager.h"
|
||||
|
||||
#include <QMetaEnum>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include "engine.h"
|
||||
#include "logging.h"
|
||||
@ -253,6 +254,7 @@ void ZigbeeManager::removeNodeResponse(int commandId, const QVariantMap ¶ms)
|
||||
|
||||
void ZigbeeManager::notificationReceived(const QVariantMap ¬ification)
|
||||
{
|
||||
qCDebug(dcZigbee()) << "Zigbee notification" << qUtf8Printable(QJsonDocument::fromVariant(notification).toJson());
|
||||
QString notificationString = notification.value("notification").toString();
|
||||
if (notificationString == "Zigbee.AdapterAdded") {
|
||||
QVariantMap adapterMap = notification.value("params").toMap().value("adapter").toMap();
|
||||
|
||||
@ -64,6 +64,7 @@ void ZigbeeNodesProxy::setZigbeeNodes(ZigbeeNodes *zigbeeNodes)
|
||||
for (int i = first; i <= last; i++) {
|
||||
m_newNodes.insert(m_zigbeeNodes->get(i), QDateTime::currentDateTime());
|
||||
}
|
||||
emit countChanged();
|
||||
});
|
||||
connect(m_zigbeeNodes, &ZigbeeNodes::dataChanged, this, [this](const QModelIndex &/*topLeft*/, const QModelIndex &/*bottomRight*/, const QVector<int> &roles = QVector<int>()){
|
||||
if (roles.contains(ZigbeeNodes::RoleReachable) && (!m_showOffline || !m_showOnline)) {
|
||||
|
||||
@ -248,7 +248,7 @@ SettingsPageBase {
|
||||
Layout.fillWidth: true
|
||||
Layout.margins: Style.margins
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: qsTr("There are no ZigBee devices connectd yet. Open the network for new devices to join and start the pairing procedure from the ZigBee device. Please refer to the devices manual for more information on how to start the pairing.")
|
||||
text: qsTr("There are no ZigBee devices connected yet. Open the network for new devices to join and start the pairing procedure from the ZigBee device. Please refer to the devices manual for more information on how to start the pairing.")
|
||||
wrapMode: Text.WordWrap
|
||||
visible: nodesModel.count === 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user