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:
David Kahles 2016-04-12 02:34:23 +02:00
parent ef488d10a8
commit 174cf3d3ce

View file

@ -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();
}