diff --git a/core/daemon.cpp b/core/daemon.cpp index 79bdf6bc2..af4c67b05 100644 --- a/core/daemon.cpp +++ b/core/daemon.cpp @@ -69,8 +69,8 @@ Daemon::Daemon(QObject *parent) const QStringList& list = KdeConnectConfig::instance()->trustedDevices(); Q_FOREACH(const QString& id, list) { Device* device = new Device(this, id); - connect(device, SIGNAL(reachableStatusChanged()), - this, SLOT(onDeviceReachableStatusChanged())); + connect(device, SIGNAL(reachableStatusChanged()), this, SLOT(onDeviceStatusChanged())); + connect(device, SIGNAL(pairingChanged(bool)), this, SLOT(onDeviceStatusChanged())); d->mDevices[id] = device; Q_EMIT deviceAdded(id); } @@ -136,14 +136,15 @@ void Daemon::onNewDeviceLink(const NetworkPackage& identityPackage, DeviceLink* //qCDebug(KDECONNECT_CORE) << "It is a new device"; Device* device = new Device(this, identityPackage, dl); - connect(device, SIGNAL(reachableStatusChanged()), this, SLOT(onDeviceReachableStatusChanged())); + connect(device, SIGNAL(reachableStatusChanged()), this, SLOT(onDeviceStatusChanged())); + connect(device, SIGNAL(pairingChanged(bool)), this, SLOT(onDeviceStatusChanged())); d->mDevices[id] = device; Q_EMIT deviceAdded(id); } } -void Daemon::onDeviceReachableStatusChanged() +void Daemon::onDeviceStatusChanged() { Device* device = (Device*)sender(); QString id = device->id(); diff --git a/core/daemon.h b/core/daemon.h index c073384a0..674ca014e 100644 --- a/core/daemon.h +++ b/core/daemon.h @@ -72,7 +72,7 @@ Q_SIGNALS: private Q_SLOTS: void onNewDeviceLink(const NetworkPackage& identityPackage, DeviceLink* dl); - void onDeviceReachableStatusChanged(); + void onDeviceStatusChanged(); private: QScopedPointer d;