From 02bc1bcd90357431a156f87388c354bf130682a5 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Sun, 21 Jun 2015 19:42:57 -0700 Subject: [PATCH] Fixed progress indicator incorrectly being displayed after unpiring --- kcm/kcm.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 28ea04b69..00b397266 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -252,18 +252,18 @@ void KdeConnectKcm::pairingFailed(const QString& error) kcmUi->messages->animatedShow(); } -void KdeConnectKcm::pairingChanged(bool pairing) +void KdeConnectKcm::pairingChanged(bool paired) { DeviceDbusInterface* senderDevice = (DeviceDbusInterface*) sender(); devicesModel->deviceStatusChanged(senderDevice->id()); if (senderDevice != currentDevice) return; - kcmUi->pair_button->setVisible(!pairing); - kcmUi->unpair_button->setVisible(pairing); - kcmUi->progressBar->setVisible(!pairing); - kcmUi->ping_button->setVisible(pairing); - kcmUi->status_label->setText(pairing ? i18n("(paired)") : i18n("(unpaired)")); + kcmUi->pair_button->setVisible(!paired); + kcmUi->unpair_button->setVisible(paired); + kcmUi->progressBar->setVisible(senderDevice->pairRequested()); + kcmUi->ping_button->setVisible(paired); + kcmUi->status_label->setText(paired ? i18n("(paired)") : i18n("(unpaired)")); } void KdeConnectKcm::pluginsConfigChanged()