Propagate pairing errors
This commit is contained in:
parent
90c8f588bc
commit
e10b2e80c9
3 changed files with 6 additions and 4 deletions
|
@ -63,6 +63,7 @@ public:
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void receivedPackage(const NetworkPackage& np);
|
void receivedPackage(const NetworkPackage& np);
|
||||||
void pairStatusChanged(DeviceLink::PairStatus status);
|
void pairStatusChanged(DeviceLink::PairStatus status);
|
||||||
|
void pairingError(const QString &error);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QCA::PrivateKey mPrivateKey;
|
QCA::PrivateKey mPrivateKey;
|
||||||
|
|
|
@ -471,7 +471,8 @@ void LanLinkProvider::userRequestsPair(const QString& deviceId)
|
||||||
void LanLinkProvider::refreshPairingHandler(const QString& deviceId) {
|
void LanLinkProvider::refreshPairingHandler(const QString& deviceId) {
|
||||||
LanPairingHandler* ph = mPairingHandlers.value(deviceId);
|
LanPairingHandler* ph = mPairingHandlers.value(deviceId);
|
||||||
if (ph) {
|
if (ph) {
|
||||||
ph->setDeviceLink(mLinks[deviceId]);
|
DeviceLink* link = mLinks[deviceId];
|
||||||
|
ph->setDeviceLink(link);
|
||||||
|
connect(ph, &LanPairingHandler::pairingError, link, &DeviceLink::pairingError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,8 +271,8 @@ void Device::addLink(const NetworkPackage& identityPackage, DeviceLink* link)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(link, SIGNAL(pairStatusChanged(PairStatus)), this, SLOT(pairStatusChanged(PairStatus, PairStatus)));
|
connect(link, &DeviceLink::pairStatusChanged, this, &Device::pairStatusChanged);
|
||||||
connect(link, SIGNAL(pairingFailed(const QString&)), this, SIGNAL(pairingFailed(const QString&)));
|
connect(link, &DeviceLink::pairingError, this, &Device::pairingError);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Device::linkDestroyed(QObject* o)
|
void Device::linkDestroyed(QObject* o)
|
||||||
|
|
Loading…
Reference in a new issue