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


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

The following commit has been merged in the master branch:
commit 461ebc4153e751622f9a09c86b06c6a13e8d1583
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Tue Aug 11 12:28:00 2009 +0000

    Fix bug where accounts were added with parameters that had not been changed from the default.
    
    svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1010009
---
 src/add-account-assistant.cpp | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/add-account-assistant.cpp b/src/add-account-assistant.cpp
index de920c0..743bd2e 100644
--- a/src/add-account-assistant.cpp
+++ b/src/add-account-assistant.cpp
@@ -286,8 +286,16 @@ void AddAccountAssistant::accept()
     foreach (Tp::ProtocolParameter *pp, mandatoryParameterValues.keys()) {
         QVariant value = mandatoryParameterValues.value(pp);
 
-        // Don't try and add empty parameters.
-        if (!value.isNull()) {
+        // Don't try and add empty parameters or ones where the default value is still set.
+        if ((!value.isNull()) && (value != pp->defaultValue())) {
+
+            // Check for params where they are empty and the default is null.
+            if (pp->type() == QVariant::String) {
+                if ((pp->defaultValue() == QVariant()) && (value.toString().isEmpty())) {
+                    continue;
+                }
+            }
+
             parameters.insert(pp->name(), value);
         }
     }
@@ -295,12 +303,22 @@ void AddAccountAssistant::accept()
     foreach (Tp::ProtocolParameter *pp, optionalParameterValues.keys()) {
         QVariant value = optionalParameterValues.value(pp);
 
-        // Don't try and add empty parameters.
-        if (!value.isNull()) {
+        // Don't try and add empty parameters or ones where the default value is still set.
+        if ((!value.isNull()) && (value != pp->defaultValue())) {
+
+            // Check for params where they are empty and the default is null.
+            if (pp->type() == QVariant::String) {
+                if ((pp->defaultValue() == QVariant()) && (value.toString().isEmpty())) {
+                    continue;
+                }
+            }
+
             parameters.insert(pp->name(), value);
         }
     }
 
+    // kDebug() << "Parameters to add with:" << parameters;
+
     // FIXME: Ask the user to submit a Display Name
     Tp::PendingAccount *pa = d->accountManager->createAccount(connectionManagerItem->connectionManager()->name(),
                                                               protocolItem->protocol(),

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list