From 174cf3d3ce3d10fdaf7ce1379a889a51bc47b2d6 Mon Sep 17 00:00:00 2001 From: David Kahles Date: Tue, 12 Apr 2016 02:34:23 +0200 Subject: [PATCH] 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 --- core/device.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/device.cpp b/core/device.cpp index 816b37a56..e4d584e95 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -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(); }