From ef788e065804383206137377ce740e967866f156 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 12 Jun 2015 17:54:47 +0200 Subject: [PATCH] Restore removed API, deprecate REVIEW: 124084 --- core/device.cpp | 8 ++++++++ core/device.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/core/device.cpp b/core/device.cpp index d2ceb8467..a7f64cf27 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -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() diff --git a/core/device.h b/core/device.h index 1512721c5..8db350a77 100644 --- a/core/device.h +++ b/core/device.h @@ -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;