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


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

The following commit has been merged in the master branch:
commit 2b6182eb7d5f248f56593c54630d6abbc5a3a553
Author: Dominik Schmidt <dev at dominik-schmidt.de>
Date:   Thu Jan 13 22:10:58 2011 +0100

    Minor polishing: next run.
---
 .../abstract-account-parameters-widget.cpp                     |  7 +++----
 src/KCMTelepathyAccounts/abstract-account-parameters-widget.h  |  4 ++--
 src/KCMTelepathyAccounts/account-edit-widget.cpp               | 10 +++++-----
 src/KCMTelepathyAccounts/parameter-edit-model.cpp              |  3 ++-
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
index 26baec6..fb29cc3 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
@@ -94,8 +94,7 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
     kDebug();
 
     QList<QWidget*> labelWidgets;
-    if(labelWidget)
-    {
+    if(labelWidget) {
         labelWidgets << labelWidget;
     }
     handleParameter(parameterName, parameterType, dataWidget, labelWidgets);
@@ -104,13 +103,13 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
 void AbstractAccountParametersWidget::handleParameter(const QString &parameterName,
                                            QVariant::Type parameterType,
                                            QWidget* dataWidget,
-                                           QList<QWidget*> labelWidgets)
+                                           const QList<QWidget*> &labelWidgets)
 {
     kDebug() << parameterType << parameterName;
 
     Tp::ProtocolParameter foundParameter = d->parameterModel->parameter(parameterName);
 
-    if(!foundParameter.isValid())
+    if(!foundParameter.isValid() || foundParameter.type() != parameterType)
     {
         // hide widgets because they are not needed
         dataWidget->hide();
diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
index 5590ea8..6071de3 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
@@ -54,11 +54,11 @@ protected:
     void handleParameter(const QString &parameterName,
                          QVariant::Type parameterType,
                          QWidget *dataWidget,
-                         QList<QWidget*> labelWidgets);
+                         const QList<QWidget*> &labelWidgets);
     void handleParameter(const QString &parameterName,
                          QVariant::Type parameterType,
                          QWidget *dataWidget,
-                         QWidget* labelWidget);
+                         QWidget *labelWidget);
 
     ParameterEditModel *parameterModel() const;
 
diff --git a/src/KCMTelepathyAccounts/account-edit-widget.cpp b/src/KCMTelepathyAccounts/account-edit-widget.cpp
index 4479a12..224dab9 100644
--- a/src/KCMTelepathyAccounts/account-edit-widget.cpp
+++ b/src/KCMTelepathyAccounts/account-edit-widget.cpp
@@ -168,8 +168,9 @@ void AccountEditWidget::loadWidgets()
 
 void AccountEditWidget::onAdvancedClicked()
 {
-    if(!d->parameterModel->validateParameterValues())
+    if(!d->parameterModel->validateParameterValues()) {
         return;
+    }
 
     KDialog dialog(this);
     dialog.setWindowTitle(i18n("Advanced Options"));
@@ -184,12 +185,11 @@ void AccountEditWidget::onAdvancedClicked()
     while(true) {
         if (dialog.exec() == KDialog::Accepted) {
             // validate the parameter values
-            if (!advancedWidget->validateParameterValues())
+            if (!advancedWidget->validateParameterValues()) {
                 continue;
-            break;
+            }
         }
-        else
-            break;
+        break;
     }
 }
 
diff --git a/src/KCMTelepathyAccounts/parameter-edit-model.cpp b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
index 3c01cad..d64fea0 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-model.cpp
+++ b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
@@ -147,8 +147,9 @@ bool ParameterEditModel::setData(const QModelIndex &index, const QVariant &value
 QModelIndex ParameterEditModel::indexForParameter(const Tp::ProtocolParameter &parameter) const
 {
     for(int i=0; i<m_items.size(); ++i) {
-        if(m_items.at(i)->parameter() == parameter)
+        if(m_items.at(i)->parameter() == parameter) {
             return createIndex(i,0);
+        }
     }
     return QModelIndex();
 }

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list