[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:36 UTC 2016


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

The following commit has been merged in the master branch:
commit a99743e8f9a85f7ce9735e4131d830ef4813aee7
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Mon Apr 25 01:25:57 2011 +0200

    Update display name after modifying the account
    
    Reviewed by: David Edmundson
    REVIEW: 101228
---
 src/edit-account-dialog.cpp | 28 ++++++++++++++++++++++++++++
 src/edit-account-dialog.h   |  1 +
 2 files changed, 29 insertions(+)

diff --git a/src/edit-account-dialog.cpp b/src/edit-account-dialog.cpp
index edf41bf..cb77d9a 100644
--- a/src/edit-account-dialog.cpp
+++ b/src/edit-account-dialog.cpp
@@ -118,6 +118,34 @@ void EditAccountDialog::onParametersUpdated(Tp::PendingOperation *op)
         return;
     }
 
+    QVariantMap values = d->widget->parametersSet();
+    // FIXME: Ask the user to submit a Display Name
+
+    QString displayName;
+    if (values.contains("account")) {
+        displayName = values["account"].toString();
+    }
+    else {
+        displayName = d->item->account()->profile()->protocolName();
+    }
+
+    Tp::PendingOperation *dnop = d->item->account()->setDisplayName(displayName);
+
+    connect(dnop,
+            SIGNAL(finished(Tp::PendingOperation*)),
+            SLOT(onDisplayNameUpdated(Tp::PendingOperation*)));
+}
+
+void EditAccountDialog::onDisplayNameUpdated(Tp::PendingOperation *op)
+{
+    kDebug();
+
+    if (op->isError()) {
+        // FIXME: Visual feedback in GUI to user.
+        kWarning() << "Could not update display name:" << op->errorName() << op->errorMessage();
+        return;
+    }
+
     emit finished();
     d->item->account()->reconnect();
 
diff --git a/src/edit-account-dialog.h b/src/edit-account-dialog.h
index 35db803..e57f6f2 100644
--- a/src/edit-account-dialog.h
+++ b/src/edit-account-dialog.h
@@ -35,6 +35,7 @@ public:
 
 private Q_SLOTS:
     void onParametersUpdated(Tp::PendingOperation *op);
+    void onDisplayNameUpdated(Tp::PendingOperation *op);
 
 private:
     Q_DISABLE_COPY(EditAccountDialog);

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list