Restore removed API, deprecate
REVIEW: 124084
This commit is contained in:
parent
a0fdfe9c31
commit
ef788e0658
2 changed files with 11 additions and 0 deletions
|
@ -81,6 +81,14 @@ Device::Device(QObject* parent, const NetworkPackage& identityPackage, DeviceLin
|
|||
|
||||
//Register in bus
|
||||
QDBusConnection::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
|
||||
|
||||
//Implement deprecated signals
|
||||
connect(this, &Device::pairingChanged, this, [this](bool newPairing) {
|
||||
if (newPairing)
|
||||
Q_EMIT pairingSuccesful();
|
||||
else
|
||||
Q_EMIT unpaired();
|
||||
});
|
||||
}
|
||||
|
||||
Device::~Device()
|
||||
|
|
|
@ -127,6 +127,9 @@ Q_SIGNALS:
|
|||
Q_SCRIPTABLE void pairingFailed(const QString& error);
|
||||
Q_SCRIPTABLE void nameChanged(const QString& name);
|
||||
|
||||
QT_DEPRECATED Q_SCRIPTABLE void pairingSuccesful();
|
||||
QT_DEPRECATED Q_SCRIPTABLE void unpaired();
|
||||
|
||||
private: //Methods
|
||||
void setName(const QString &name);
|
||||
QString iconForStatus(bool reachable, bool paired) const;
|
||||
|
|
Loading…
Reference in a new issue