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";
|
||||
|
||||
PairStatus prevPairStatus = m_pairStatus;
|
||||
m_pairStatus = Device::NotPaired;
|
||||
|
||||
if (prevPairStatus == Device::Requested) {
|
||||
if (m_pairStatus == Device::Requested) {
|
||||
m_pairingTimeut.stop();
|
||||
m_pairStatus = Device::NotPaired;
|
||||
Q_EMIT pairingFailed(i18n("Canceled by other peer"));
|
||||
} else if (prevPairStatus == Device::Paired) {
|
||||
} else if (m_pairStatus == Device::Paired) {
|
||||
unpairInternal();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue