[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Fri May 27 23:59:55 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=a333fbd

The following commit has been merged in the master branch:
commit a333fbdea3c18a881b55d5424d0b166d1aea5e6b
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Mon Sep 19 14:35:10 2011 +0100

    Reconnect account after editing only if required
    
    Reviewed-by: David Edmundson <kde at david.edmundson.co.uk>
---
 src/edit-account-dialog.cpp | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/edit-account-dialog.cpp b/src/edit-account-dialog.cpp
index cb77d9a..3653974 100644
--- a/src/edit-account-dialog.cpp
+++ b/src/edit-account-dialog.cpp
@@ -43,13 +43,14 @@ class EditAccountDialog::Private
 {
 public:
     Private()
-            : item(0), widget(0)
+            : item(0), widget(0), reconnectRequired(false)
     {
         kDebug();
     }
 
     AccountItem *item;
     AccountEditWidget *widget;
+    bool reconnectRequired;
 };
 
 EditAccountDialog::EditAccountDialog(AccountItem *item, QWidget *parent)
@@ -118,6 +119,19 @@ void EditAccountDialog::onParametersUpdated(Tp::PendingOperation *op)
         return;
     }
 
+    Tp::PendingStringList *psl = dynamic_cast<Tp::PendingStringList*>(op);
+
+    Q_ASSERT(psl);
+    if (!psl)
+    {
+        kWarning() << "Something  weird happened";
+    }
+
+    if (psl->result().size() > 0) {
+        kDebug() << "The following parameters won't be updated until reconnection: " << psl->result();
+        d->reconnectRequired = true;
+    }
+
     QVariantMap values = d->widget->parametersSet();
     // FIXME: Ask the user to submit a Display Name
 
@@ -147,7 +161,10 @@ void EditAccountDialog::onDisplayNameUpdated(Tp::PendingOperation *op)
     }
 
     emit finished();
-    d->item->account()->reconnect();
+
+    if (d->reconnectRequired) {
+        d->item->account()->reconnect();
+    }
 
     // set the dialog as accepted and exit
     done(KDialog::Accepted);

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list