Restore removed API, deprecate

REVIEW: 124084
This commit is contained in:
Aleix Pol 2015-06-12 17:54:47 +02:00
parent a0fdfe9c31
commit ef788e0658
2 changed files with 11 additions and 0 deletions

View file

@ -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()

View file

@ -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;