Don't reset m_pairStatus when unpair is requested by remote device
unpairInternal() will take care of this, otherwise pairingChanged() will not be emited and though, the model won't notice it. REVIEW: 127641
This commit is contained in:
parent
ef488d10a8
commit
174cf3d3ce
1 changed files with 3 additions and 5 deletions
|
@ -395,13 +395,11 @@ void Device::privateReceivedPackage(const NetworkPackage& np)
|
||||||
|
|
||||||
qCDebug(KDECONNECT_CORE) << "Unpair request";
|
qCDebug(KDECONNECT_CORE) << "Unpair request";
|
||||||
|
|
||||||
PairStatus prevPairStatus = m_pairStatus;
|
if (m_pairStatus == Device::Requested) {
|
||||||
m_pairStatus = Device::NotPaired;
|
|
||||||
|
|
||||||
if (prevPairStatus == Device::Requested) {
|
|
||||||
m_pairingTimeut.stop();
|
m_pairingTimeut.stop();
|
||||||
|
m_pairStatus = Device::NotPaired;
|
||||||
Q_EMIT pairingFailed(i18n("Canceled by other peer"));
|
Q_EMIT pairingFailed(i18n("Canceled by other peer"));
|
||||||
} else if (prevPairStatus == Device::Paired) {
|
} else if (m_pairStatus == Device::Paired) {
|
||||||
unpairInternal();
|
unpairInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue