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


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

The following commit has been merged in the master branch:
commit 6dd47be98918f50facf5e20873ffb0d5fbe3b4f5
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sat Jan 22 13:48:03 2011 +0000

    Renamed ambiguous "setParameters" method, to "parametersSet"
    Explicitly call submit() on the data widget mapper, this fixes a bug of
    sometimes not values in the form.
---
 .../abstract-account-parameters-widget.cpp                    |  5 ++---
 src/KCMTelepathyAccounts/abstract-account-parameters-widget.h |  2 +-
 src/KCMTelepathyAccounts/account-edit-widget.cpp              | 11 +++++++----
 src/KCMTelepathyAccounts/account-edit-widget.h                |  4 ++--
 src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp  |  4 ++--
 src/KCMTelepathyAccounts/generic-advanced-options-widget.h    |  2 +-
 src/KCMTelepathyAccounts/parameter-edit-model.cpp             |  4 ++--
 src/KCMTelepathyAccounts/parameter-edit-model.h               |  4 ++--
 src/add-account-assistant.cpp                                 |  2 +-
 src/edit-account-dialog.cpp                                   |  4 ++--
 10 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
index ac7b653..2ebc4ef 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
@@ -122,9 +122,9 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
     }
 }
 
-void AbstractAccountParametersWidget::updateParameterModel()
+void AbstractAccountParametersWidget::submit()
 {
-
+    d->mapper->submit();
 }
 
 ParameterEditModel* AbstractAccountParametersWidget::parameterModel() const
@@ -133,6 +133,5 @@ ParameterEditModel* AbstractAccountParametersWidget::parameterModel() const
 }
 
 
-
 #include "abstract-account-parameters-widget.moc"
 
diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
index d91f34e..ed80752 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
@@ -49,7 +49,7 @@ public:
     /** Makes sure the model is up to date.
         Subclasses which do not only use the 'handleParameter' interface should implement this.
     */
-    virtual void updateParameterModel();
+    virtual void submit();
 
     virtual bool validateParameterValues();
 
diff --git a/src/KCMTelepathyAccounts/account-edit-widget.cpp b/src/KCMTelepathyAccounts/account-edit-widget.cpp
index dfd6763..5c09e5d 100644
--- a/src/KCMTelepathyAccounts/account-edit-widget.cpp
+++ b/src/KCMTelepathyAccounts/account-edit-widget.cpp
@@ -168,14 +168,16 @@ void AccountEditWidget::loadWidgets()
     }
 }
 
-QVariantMap AccountEditWidget::setParameters() const
+QVariantMap AccountEditWidget::parametersSet() const
 {
-    return d->parameterModel->setParameters();
+    d->mainOptionsWidget->submit();
+    return d->parameterModel->parametersSet();
 }
 
-QStringList AccountEditWidget::unsetParameters() const
+QStringList AccountEditWidget::parametersUnset() const
 {
-    return d->parameterModel->unsetParameters();
+    d->mainOptionsWidget->submit();
+    return d->parameterModel->parametersUnset();
 }
 
 void AccountEditWidget::onAdvancedClicked()
@@ -196,6 +198,7 @@ void AccountEditWidget::onAdvancedClicked()
 
     while(true) {
         if (dialog.exec() == KDialog::Accepted) {
+            advancedWidget->submit();
             // validate the parameter values
             if (!advancedWidget->validateParameterValues()) {
                 continue;
diff --git a/src/KCMTelepathyAccounts/account-edit-widget.h b/src/KCMTelepathyAccounts/account-edit-widget.h
index d3d5535..11d8077 100644
--- a/src/KCMTelepathyAccounts/account-edit-widget.h
+++ b/src/KCMTelepathyAccounts/account-edit-widget.h
@@ -44,8 +44,8 @@ public:
 
     virtual bool validateParameterValues() const;
 
-    virtual QVariantMap setParameters() const;
-    virtual QStringList unsetParameters() const;
+    virtual QVariantMap parametersSet() const;
+    virtual QStringList parametersUnset() const;
 
 protected:
     ParameterEditModel *parameterModel() const;
diff --git a/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp b/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
index d42e131..b618fba 100644
--- a/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
+++ b/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
@@ -78,10 +78,10 @@ void GenericAdvancedOptionsWidget::setTabBarHidden(bool hidden)
     d->tabWidget->setTabBarHidden(hidden);
 }
 
-void GenericAdvancedOptionsWidget::updateParameterModel()
+void GenericAdvancedOptionsWidget::submit()
 {
     foreach(AbstractAccountParametersWidget *widget, d->widgets) {
-        widget->updateParameterModel();
+        widget->submit();
     }
 
 }
diff --git a/src/KCMTelepathyAccounts/generic-advanced-options-widget.h b/src/KCMTelepathyAccounts/generic-advanced-options-widget.h
index 41111ce..b1bca8a 100644
--- a/src/KCMTelepathyAccounts/generic-advanced-options-widget.h
+++ b/src/KCMTelepathyAccounts/generic-advanced-options-widget.h
@@ -38,7 +38,7 @@ public:
 
     void setTabBarHidden(bool hidden);
 
-    void updateParameterModel();
+    void submit();
 
     void addTab(AbstractAccountParametersWidget *tab, const QString &label);
 
diff --git a/src/KCMTelepathyAccounts/parameter-edit-model.cpp b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
index 1bfa735..441b6e5 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-model.cpp
+++ b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
@@ -207,7 +207,7 @@ Tp::ProtocolParameterList ParameterEditModel::parameters() const
     return parameters;
 }
 
-QVariantMap ParameterEditModel::setParameters() const
+QVariantMap ParameterEditModel::parametersSet() const
 {
     QVariantMap setParameters;
     foreach (ParameterItem *item, m_items) {
@@ -224,7 +224,7 @@ QVariantMap ParameterEditModel::setParameters() const
     return setParameters;
 }
 
-QStringList ParameterEditModel::unsetParameters() const
+QStringList ParameterEditModel::parametersUnset() const
 {
     QStringList unsetParameters;
     foreach (ParameterItem *item, m_items) {
diff --git a/src/KCMTelepathyAccounts/parameter-edit-model.h b/src/KCMTelepathyAccounts/parameter-edit-model.h
index 01b95ec..d904fac 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-model.h
+++ b/src/KCMTelepathyAccounts/parameter-edit-model.h
@@ -71,10 +71,10 @@ public:
     Tp::ProtocolParameterList parameters() const;
 
     /** Returns a map of the parameters values, keyed by parameter name in a format suitable for sending to Telepathy*/
-    QVariantMap setParameters() const;
+    QVariantMap parametersSet() const;
 
     /** Returns a list of the names of parameters which are handled by the model, but should not be saved in the user's settings*/
-    QStringList unsetParameters() const;
+    QStringList parametersUnset() const;
 
 
     bool validateParameterValues();
diff --git a/src/add-account-assistant.cpp b/src/add-account-assistant.cpp
index b43ad24..eb9a644 100644
--- a/src/add-account-assistant.cpp
+++ b/src/add-account-assistant.cpp
@@ -151,7 +151,7 @@ void AddAccountAssistant::accept()
     }
 
     // Get the parameter values.
-    QVariantMap values  = d->accountEditWidget->setParameters();
+    QVariantMap values  = d->accountEditWidget->parametersSet();
 
     // FIXME: In some next version of tp-qt4 there should be a convenience class for this
     // https://bugs.freedesktop.org/show_bug.cgi?id=33153
diff --git a/src/edit-account-dialog.cpp b/src/edit-account-dialog.cpp
index d4748d1..bcfaca2 100644
--- a/src/edit-account-dialog.cpp
+++ b/src/edit-account-dialog.cpp
@@ -94,8 +94,8 @@ void EditAccountDialog::accept()
         return;
     }
 
-    QVariantMap setParameters = d->widget->setParameters();
-    QStringList unsetParameters = d->widget->unsetParameters();
+    QVariantMap setParameters = d->widget->parametersSet();
+    QStringList unsetParameters = d->widget->parametersUnset();
 
     kDebug() << "Set parameters:" << setParameters;
     kDebug() << "Unset parameters:" << unsetParameters;

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list