Fixed bug causing plugins not being unloaded
When unpairing from device
This commit is contained in:
parent
904c5484e7
commit
445cb84e89
1 changed files with 5 additions and 4 deletions
|
@ -323,18 +323,19 @@ void Device::privateReceivedPackage(const NetworkPackage& np)
|
|||
|
||||
kDebug(kdeconnect_kded()) << "Unpair request";
|
||||
|
||||
if (m_pairStatus == Device::Requested) {
|
||||
PairStatus prevPairStatus = m_pairStatus;
|
||||
m_pairStatus = Device::NotPaired;
|
||||
|
||||
if (prevPairStatus == Device::Requested) {
|
||||
pairingTimer.stop();
|
||||
Q_EMIT pairingFailed(i18n("Canceled by other peer"));
|
||||
} else if (m_pairStatus == Device::Paired) {
|
||||
} else if (prevPairStatus == Device::Paired) {
|
||||
KSharedConfigPtr config = KSharedConfig::openConfig("kdeconnectrc");
|
||||
config->group("trusted_devices").deleteGroup(id());
|
||||
reloadPlugins();
|
||||
Q_EMIT unpaired();
|
||||
}
|
||||
|
||||
m_pairStatus = Device::NotPaired;
|
||||
|
||||
}
|
||||
|
||||
} else if (isPaired()) {
|
||||
|
|
Loading…
Reference in a new issue