Add NOTIFY signal to statusIconName property

Device::statusIconName depends on isReachable() and isTrusted()

Not sure how the property is used but it's good that they have a NOTIFY is defined if it's needed for completion
This commit is contained in:
Albert Astals Cid 2019-07-21 17:53:06 +02:00
parent e883a792e6
commit 9405cb58b0
2 changed files with 5 additions and 1 deletions

View file

@ -109,6 +109,9 @@ Device::Device(QObject* parent, const NetworkPacket& identityPacket, DeviceLink*
DbusHelper::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
connect(this, &Device::pairingError, this, &warn);
connect(this, &Device::reachableChanged, this, &Device::statusIconNameChanged);
connect(this, &Device::trustedChanged, this, &Device::statusIconNameChanged);
}
Device::~Device()

View file

@ -39,7 +39,7 @@ class KDECONNECTCORE_EXPORT Device
Q_PROPERTY(QString type READ type CONSTANT)
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
Q_PROPERTY(QString iconName READ iconName CONSTANT)
Q_PROPERTY(QString statusIconName READ statusIconName)
Q_PROPERTY(QString statusIconName READ statusIconName NOTIFY statusIconNameChanged)
Q_PROPERTY(bool isReachable READ isReachable NOTIFY reachableChanged)
Q_PROPERTY(bool isTrusted READ isTrusted NOTIFY trustedChanged)
Q_PROPERTY(QStringList supportedPlugins READ supportedPlugins NOTIFY pluginsChanged)
@ -134,6 +134,7 @@ Q_SIGNALS:
Q_SCRIPTABLE void trustedChanged(bool trusted);
Q_SCRIPTABLE void pairingError(const QString& error);
Q_SCRIPTABLE void nameChanged(const QString& name);
Q_SCRIPTABLE void statusIconNameChanged();
Q_SCRIPTABLE void hasPairingRequestsChanged(bool hasPairingRequests);