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


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

The following commit has been merged in the master branch:
commit 7d25fbbfb355453dbfbd3511874e39792d51f66d
Author: Dominik Schmidt <dev at dominik-schmidt.de>
Date:   Thu Jan 13 21:33:52 2011 +0100

    Minor polishing as suggested by the reviews.
---
 .../abstract-account-parameters-widget.cpp         | 41 ++++++++----------
 .../abstract-account-parameters-widget.h           |  4 +-
 src/KCMTelepathyAccounts/abstract-account-ui.cpp   |  4 +-
 src/KCMTelepathyAccounts/abstract-account-ui.h     |  4 +-
 src/KCMTelepathyAccounts/account-edit-widget.cpp   | 42 +++++++-----------
 src/KCMTelepathyAccounts/account-edit-widget.h     |  4 +-
 .../generic-advanced-options-widget.cpp            |  4 +-
 src/KCMTelepathyAccounts/parameter-edit-model.cpp  | 50 ++++++++++++----------
 src/KCMTelepathyAccounts/parameter-edit-model.h    |  1 +
 src/KCMTelepathyAccounts/parameter-edit-widget.cpp | 24 ++---------
 src/KCMTelepathyAccounts/parameter-edit-widget.h   |  6 +--
 src/KCMTelepathyAccounts/parameter-item.cpp        |  1 -
 src/add-account-assistant.cpp                      |  6 +--
 src/edit-account-dialog.cpp                        |  6 +--
 14 files changed, 83 insertions(+), 114 deletions(-)

diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
index 4466c12..26baec6 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
@@ -36,27 +36,27 @@ class AbstractAccountParametersWidget::Private
 {
 public:
     Private()
-        : model(0),
+        : parameterModel(0),
         mapper(0)
     {
         kDebug();
     }
-    ParameterEditModel *model;
+    ParameterEditModel *parameterModel;
     QDataWidgetMapper *mapper;
     Tp::ProtocolParameterList parameters;
 };
 
-AbstractAccountParametersWidget::AbstractAccountParametersWidget(ParameterEditModel *model,
+AbstractAccountParametersWidget::AbstractAccountParametersWidget(ParameterEditModel *parameterModel,
                                                                  QWidget *parent)
         : QWidget(parent),
           d(new Private)
 {
     kDebug();
 
-    d->model = model;
+    d->parameterModel = parameterModel;
 
     d->mapper = new QDataWidgetMapper(this);
-    d->mapper->setModel(d->model);
+    d->mapper->setModel(d->parameterModel);
 
     d->mapper->setOrientation(Qt::Vertical);
 }
@@ -73,7 +73,7 @@ QList<ProtocolParameterValue> AbstractAccountParametersWidget::parameterValues()
 {
     kDebug();
 
-    return d->model->parameterValues();
+    return d->parameterModel->parameterValues();
 }
 
 Tp::ProtocolParameterList AbstractAccountParametersWidget::parameters() const
@@ -83,7 +83,7 @@ Tp::ProtocolParameterList AbstractAccountParametersWidget::parameters() const
 
 bool AbstractAccountParametersWidget::validateParameterValues()
 {
-    return d->model->validateParameterValues();
+    return d->parameterModel->validateParameterValues();
 }
 
 void AbstractAccountParametersWidget::handleParameter(const QString &parameterName,
@@ -94,7 +94,10 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
     kDebug();
 
     QList<QWidget*> labelWidgets;
-    labelWidgets << labelWidget;
+    if(labelWidget)
+    {
+        labelWidgets << labelWidget;
+    }
     handleParameter(parameterName, parameterType, dataWidget, labelWidgets);
 }
 
@@ -105,13 +108,7 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
 {
     kDebug() << parameterType << parameterName;
 
-    Tp::ProtocolParameter foundParameter;
-    foreach(const Tp::ProtocolParameter &parameter, model()->parameters())
-    {
-        if ((parameter.name() == parameterName) && (parameter.type() == parameterType)) {
-            foundParameter = parameter;
-        }
-    }
+    Tp::ProtocolParameter foundParameter = d->parameterModel->parameter(parameterName);
 
     if(!foundParameter.isValid())
     {
@@ -119,17 +116,15 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
         dataWidget->hide();
         foreach(QWidget *label, labelWidgets)
         {
-            if(label)
-            {
+            if(label) {
                 label->hide();
             }
         }
         return;
     }
-    
-    QModelIndex index = d->model->indexForParameter(foundParameter);
-    if(index.isValid())
-    {
+
+    QModelIndex index = d->parameterModel->indexForParameter(foundParameter);
+    if(index.isValid()) {
         kDebug() << index << parameterName;
         // insert it to valid parameters list
         d->mapper->addMapping(dataWidget, index.row());
@@ -137,9 +132,9 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
     }
 }
 
-ParameterEditModel* AbstractAccountParametersWidget::model() const
+ParameterEditModel* AbstractAccountParametersWidget::parameterModel() const
 {
-    return d->model;
+    return d->parameterModel;
 }
 
 
diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
index 7a33ba5..5590ea8 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.h
@@ -42,7 +42,7 @@ class KDE_EXPORT AbstractAccountParametersWidget : public QWidget
     Q_OBJECT
 
 public:
-    explicit AbstractAccountParametersWidget(ParameterEditModel *model,
+    explicit AbstractAccountParametersWidget(ParameterEditModel *parameterModel,
                                              QWidget *parent = 0);
     virtual ~AbstractAccountParametersWidget();
 
@@ -60,7 +60,7 @@ protected:
                          QWidget *dataWidget,
                          QWidget* labelWidget);
 
-    ParameterEditModel *model() const;
+    ParameterEditModel *parameterModel() const;
 
 private:
     Q_DISABLE_COPY(AbstractAccountParametersWidget);
diff --git a/src/KCMTelepathyAccounts/abstract-account-ui.cpp b/src/KCMTelepathyAccounts/abstract-account-ui.cpp
index 7b96054..500452b 100644
--- a/src/KCMTelepathyAccounts/abstract-account-ui.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-ui.cpp
@@ -53,9 +53,11 @@ bool AbstractAccountUi::hasAdvancedOptionsWidget() const
     return false;
 }
 
-AbstractAccountParametersWidget* AbstractAccountUi::advancedOptionsWidget(ParameterEditModel *model,
+AbstractAccountParametersWidget* AbstractAccountUi::advancedOptionsWidget(ParameterEditModel *parameterModel,
                                                                           QWidget *parent) const
 {
+    Q_UNUSED(parameterModel);
+    Q_UNUSED(parent);
     return 0;
 }
 
diff --git a/src/KCMTelepathyAccounts/abstract-account-ui.h b/src/KCMTelepathyAccounts/abstract-account-ui.h
index 3d81a5c..a86ce69 100644
--- a/src/KCMTelepathyAccounts/abstract-account-ui.h
+++ b/src/KCMTelepathyAccounts/abstract-account-ui.h
@@ -44,11 +44,11 @@ public:
     virtual const QMap<QString, QVariant::Type> &supportedParameters() const;
 
     virtual AbstractAccountParametersWidget
-              *mainOptionsWidget(ParameterEditModel *model,
+              *mainOptionsWidget(ParameterEditModel *parameterModel,
                                  QWidget *parent = 0) const = 0;
     virtual bool hasAdvancedOptionsWidget() const;
     virtual AbstractAccountParametersWidget
-              *advancedOptionsWidget(ParameterEditModel *model,
+              *advancedOptionsWidget(ParameterEditModel *parameterModel,
                                      QWidget *parent = 0) const;
 
 protected:
diff --git a/src/KCMTelepathyAccounts/account-edit-widget.cpp b/src/KCMTelepathyAccounts/account-edit-widget.cpp
index fb57dd9..4479a12 100644
--- a/src/KCMTelepathyAccounts/account-edit-widget.cpp
+++ b/src/KCMTelepathyAccounts/account-edit-widget.cpp
@@ -44,19 +44,16 @@ public:
 
     QString connectionManager;
     QString protocol;
-    Tp::ProtocolParameterList parameters;
-    QVariantMap parameterValues;
 
-    ParameterEditModel *model;
+    ParameterEditModel *parameterModel;
 
     AbstractAccountUi *accountUi;
     Ui::AccountEditWidget *ui;
     AbstractAccountParametersWidget *mainOptionsWidget;
-    QList<ProtocolParameterValue> advancedParameterValues;
 };
 
 AccountEditWidget::AccountEditWidget(const Tp::ProtocolInfo &info,
-                                     ParameterEditModel *model,
+                                     ParameterEditModel *parameterModel,
                                      QWidget *parent)
         : QWidget(parent),
           d(new Private)
@@ -67,10 +64,9 @@ AccountEditWidget::AccountEditWidget(const Tp::ProtocolInfo &info,
     d->ui = new Ui::AccountEditWidget;
     d->ui->setupUi(this);
 
-    d->model = model;
+    d->parameterModel = parameterModel;
     d->connectionManager = info.cmName();
     d->protocol = info.name();
-    d->parameters = info.parameters();
 
     connect(d->ui->advancedButton, SIGNAL(clicked()),
             this, SLOT(onAdvancedClicked()));
@@ -95,16 +91,14 @@ bool AccountEditWidget::validateParameterValues() const
 {
     // the parameters handle by the advanced dialog are validated when the
     // dialog exits, so no need to validate them here
-    return d->mainOptionsWidget->validateParameterValues();
+    return d->parameterModel->validateParameterValues();
 }
 
 QList<ProtocolParameterValue> AccountEditWidget::parameterValues() const
 {
     QList<ProtocolParameterValue> values;
-    values = d->mainOptionsWidget->parameterValues();
+    values = d->parameterModel->parameterValues();
 
-    // append the advanced options, if any
-    values.append(d->advancedParameterValues);
     return values;
 }
 
@@ -112,7 +106,7 @@ void AccountEditWidget::loadWidgets()
 {
     Tp::ProtocolParameterList mandatoryParameters;
 
-    foreach (const Tp::ProtocolParameter &parameter, d->parameters) {
+    foreach (const Tp::ProtocolParameter &parameter, d->parameterModel->parameters()) {
         if (parameter.isRequired()) {
             mandatoryParameters.append(parameter);
         }
@@ -125,7 +119,7 @@ void AccountEditWidget::loadWidgets()
     // Create the custom UI or generic UI depending on available parameters.
     if (d->accountUi) {
         // UI does exist, set it up.
-        d->mainOptionsWidget = d->accountUi->mainOptionsWidget(d->model,
+        d->mainOptionsWidget = d->accountUi->mainOptionsWidget(d->parameterModel,
                                                                this);
         //Widgets wrapped in a layout should not have double margins
         d->mainOptionsWidget->layout()->setContentsMargins(0, 0, 0, 0);
@@ -139,7 +133,7 @@ void AccountEditWidget::loadWidgets()
         bool paramFound = false;
         while(paramIter != params.constEnd()) {
             paramFound = false;
-            foreach (const Tp::ProtocolParameter &parameter, d->parameters) {
+            foreach (const Tp::ProtocolParameter &parameter, d->parameterModel->parameters()) {
                 if ((parameter.name() == paramIter.key()) &&
                     (parameter.type() == paramIter.value())) {
                     mandatoryParameters.removeAll(parameter);
@@ -164,7 +158,7 @@ void AccountEditWidget::loadWidgets()
 
     if (!d->mainOptionsWidget) {
         d->mainOptionsWidget = new ParameterEditWidget(
-                d->model,
+                d->parameterModel,
                 this);
         d->ui->advancedButton->setVisible(false);
         d->ui->verticalLayout->insertWidget(1, d->mainOptionsWidget);
@@ -174,11 +168,14 @@ void AccountEditWidget::loadWidgets()
 
 void AccountEditWidget::onAdvancedClicked()
 {
+    if(!d->parameterModel->validateParameterValues())
+        return;
+
     KDialog dialog(this);
     dialog.setWindowTitle(i18n("Advanced Options"));
 
     AbstractAccountParametersWidget *advancedWidget;
-    advancedWidget = d->accountUi->advancedOptionsWidget(model(),
+    advancedWidget = d->accountUi->advancedOptionsWidget(d->parameterModel,
                                                          &dialog);
     dialog.setMainWidget(advancedWidget);
 
@@ -189,15 +186,6 @@ void AccountEditWidget::onAdvancedClicked()
             // validate the parameter values
             if (!advancedWidget->validateParameterValues())
                 continue;
-
-            // at this point the values are fine
-            d->advancedParameterValues = advancedWidget->parameterValues();
-            // update the parameter values in case the dialog is opened again
-
-            foreach(const ProtocolParameterValue &ppv, d->advancedParameterValues)
-            {
-                d->parameterValues.insert(ppv.name(), ppv.value());
-            }
             break;
         }
         else
@@ -205,9 +193,9 @@ void AccountEditWidget::onAdvancedClicked()
     }
 }
 
-ParameterEditModel* AccountEditWidget::model() const
+ParameterEditModel* AccountEditWidget::parameterModel() const
 {
-    return d->model;
+    return d->parameterModel;
 }
 
 #include "account-edit-widget.moc"
diff --git a/src/KCMTelepathyAccounts/account-edit-widget.h b/src/KCMTelepathyAccounts/account-edit-widget.h
index e5b9d0d..95e2923 100644
--- a/src/KCMTelepathyAccounts/account-edit-widget.h
+++ b/src/KCMTelepathyAccounts/account-edit-widget.h
@@ -38,7 +38,7 @@ class KDE_EXPORT AccountEditWidget : public QWidget
 
 public:
     explicit AccountEditWidget(const Tp::ProtocolInfo &info,
-                               ParameterEditModel *model,
+                               ParameterEditModel *parameterModel,
                                QWidget *parent = 0);
     virtual ~AccountEditWidget();
 
@@ -46,7 +46,7 @@ public:
     virtual QList<ProtocolParameterValue> parameterValues() const;
 
 protected:
-    ParameterEditModel *model() const;
+    ParameterEditModel *parameterModel() const;
 
 private Q_SLOTS:
     void onAdvancedClicked();
diff --git a/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp b/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
index e58feed..0e39b47 100644
--- a/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
+++ b/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
@@ -40,9 +40,9 @@ public:
     QList<AbstractAccountParametersWidget*> widgets;
 };
 
-GenericAdvancedOptionsWidget::GenericAdvancedOptionsWidget(ParameterEditModel *model,
+GenericAdvancedOptionsWidget::GenericAdvancedOptionsWidget(ParameterEditModel *parameterModel,
                                              QWidget *parent)
- : AbstractAccountParametersWidget(model, parent),
+ : AbstractAccountParametersWidget(parameterModel, parent),
    d(new Private)
 {
     QHBoxLayout *layout = new QHBoxLayout(this);
diff --git a/src/KCMTelepathyAccounts/parameter-edit-model.cpp b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
index 7914ce4..3c01cad 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-model.cpp
+++ b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
@@ -62,7 +62,10 @@ int ParameterEditModel::rowCount(const QModelIndex &index) const
 
 QVariant ParameterEditModel::data(const QModelIndex &index, int role) const
 {
-   // kDebug() << index << role;
+    if(!index.isValid()) {
+        return QVariant();
+    }
+
     // FIXME: This is a basic implementation just so I can see what's going
     // on while developing this code further. Needs expanding.
     QVariant data;
@@ -70,20 +73,7 @@ QVariant ParameterEditModel::data(const QModelIndex &index, int role) const
     switch(role)
     {
     case Qt::DisplayRole:
-        data = this->data(index, ParameterEditModel::ValueRole);
-        break;
     case Qt::EditRole:
-        data = this->data(index, ParameterEditModel::ValueRole);
-        break;
-    case ParameterEditModel::NameRole:
-        data = QVariant(m_items.at(index.row())->name());
-        break;
-    case ParameterEditModel::LocalizedNameRole:
-        data = QVariant(m_items.at(index.row())->localizedName());
-        break;
-    case ParameterEditModel::TypeRole:
-        data = QVariant(m_items.at(index.row())->type());
-        break;
     case ParameterEditModel::ValueRole:
         data = QVariant(m_items.at(index.row())->value());
         if(!data.isValid())
@@ -94,6 +84,15 @@ QVariant ParameterEditModel::data(const QModelIndex &index, int role) const
     case ParameterEditModel::DefaultValueRole:
         data = QVariant(m_items.at(index.row())->parameter().defaultValue());
         break;
+    case ParameterEditModel::NameRole:
+        data = QVariant(m_items.at(index.row())->name());
+        break;
+    case ParameterEditModel::LocalizedNameRole:
+        data = QVariant(m_items.at(index.row())->localizedName());
+        break;
+    case ParameterEditModel::TypeRole:
+        data = QVariant(m_items.at(index.row())->type());
+        break;
     case ParameterEditModel::SecretRole:
         data = QVariant(m_items.at(index.row())->isSecret());
         break;
@@ -115,18 +114,11 @@ QVariant ParameterEditModel::data(const QModelIndex &index, int role) const
 
 bool ParameterEditModel::setData(const QModelIndex &index, const QVariant &value, int role)
 {
-    //kDebug() << index << value << role;
-
-    if (index.row() == -1) {
+    if (!index.isValid()) {
         kDebug() << "Invalid item row accessed.";
         return false;
     }
 
-    if (index.row() >= m_items.size()) {
-        kWarning() << "Out of range row accessed." << index.row();
-        return false;
-    }
-
     if (role == ParameterEditModel::ValueRole || role == Qt::EditRole) {
 
         m_items.at(index.row())->setValue(value);
@@ -156,11 +148,23 @@ QModelIndex ParameterEditModel::indexForParameter(const Tp::ProtocolParameter &p
 {
     for(int i=0; i<m_items.size(); ++i) {
         if(m_items.at(i)->parameter() == parameter)
-            return createIndex(i,0,0);
+            return createIndex(i,0);
     }
     return QModelIndex();
 }
 
+Tp::ProtocolParameter ParameterEditModel::parameter(const QString &parameterName) const
+{
+    foreach(ParameterItem* item, m_items) {
+        if(item->parameter().name() == parameterName) {
+            return item->parameter();
+        }
+    }
+
+    return Tp::ProtocolParameter();
+}
+
+
 void ParameterEditModel::addItem(const Tp::ProtocolParameter &parameter, const QVariant &originalValue)
 {
     kDebug();
diff --git a/src/KCMTelepathyAccounts/parameter-edit-model.h b/src/KCMTelepathyAccounts/parameter-edit-model.h
index 582daab..44c9d4d 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-model.h
+++ b/src/KCMTelepathyAccounts/parameter-edit-model.h
@@ -59,6 +59,7 @@ public:
     virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
     virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
     QModelIndex indexForParameter(const Tp::ProtocolParameter &parameter) const;
+    Tp::ProtocolParameter parameter(const QString &parameterName) const;
 
     void addItem(const Tp::ProtocolParameter &parameter, const QVariant &originalValue);
     void addItems(const Tp::ProtocolParameterList &parameters, const QVariantMap &parameterValues = QVariantMap());
diff --git a/src/KCMTelepathyAccounts/parameter-edit-widget.cpp b/src/KCMTelepathyAccounts/parameter-edit-widget.cpp
index b3472a9..34e161a 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-widget.cpp
+++ b/src/KCMTelepathyAccounts/parameter-edit-widget.cpp
@@ -41,9 +41,9 @@ public:
     ParameterEditDelegate *delegate;
 };
 
-ParameterEditWidget::ParameterEditWidget(ParameterEditModel *model,
+ParameterEditWidget::ParameterEditWidget(ParameterEditModel *parameterModel,
                                          QWidget *parent)
- : AbstractAccountParametersWidget(model, parent),
+ : AbstractAccountParametersWidget(parameterModel, parent),
    d(new Private)
 {
     kDebug();
@@ -52,18 +52,13 @@ ParameterEditWidget::ParameterEditWidget(ParameterEditModel *model,
     d->ui = new Ui::ParameterEditWidget;
     d->ui->setupUi(this);
 
-    d->ui->parameterListView->setModel(this->model());
+    d->ui->parameterListView->setModel(parameterModel);
     d->delegate = new ParameterEditDelegate(d->ui->parameterListView, this);
     d->ui->parameterListView->setItemDelegate(d->delegate);
 
     connect(d->delegate,
             SIGNAL(dataChanged(QModelIndex, QVariant, int)),
             SLOT(onDelegateDataChanged(QModelIndex, QVariant, int)));
-
-    /*// Add the parameters to the model.
-    foreach (const Tp::ProtocolParameter &parameter, parameters) {
-        d->model->addItem(parameter, values.value(parameter.name(), parameter.defaultValue()));
-    }*/
 }
 
 ParameterEditWidget::~ParameterEditWidget()
@@ -74,20 +69,9 @@ ParameterEditWidget::~ParameterEditWidget()
     delete d;
 }
 
-QList<ProtocolParameterValue> ParameterEditWidget::parameterValues() const
-{
-    return model()->parameterValues();
-}
-
-
 void ParameterEditWidget::onDelegateDataChanged(const QModelIndex &index, const QVariant &value, int role)
 {
-    model()->setData(index, value, role);
-}
-
-bool ParameterEditWidget::validateParameterValues()
-{
-    return model()->validateParameterValues();
+    parameterModel()->setData(index, value, role);
 }
 
 #include "parameter-edit-widget.moc"
diff --git a/src/KCMTelepathyAccounts/parameter-edit-widget.h b/src/KCMTelepathyAccounts/parameter-edit-widget.h
index 891becb..4e48478 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-widget.h
+++ b/src/KCMTelepathyAccounts/parameter-edit-widget.h
@@ -33,14 +33,10 @@ class KDE_EXPORT ParameterEditWidget : public AbstractAccountParametersWidget
     Q_OBJECT
 
 public:
-    explicit ParameterEditWidget(ParameterEditModel *model,
+    explicit ParameterEditWidget(ParameterEditModel *parameterModel,
                                  QWidget *parent = 0);
     ~ParameterEditWidget();
 
-    virtual QList<ProtocolParameterValue> parameterValues() const;
-
-    virtual bool validateParameterValues();
-
 private Q_SLOTS:
     void onDelegateDataChanged(const QModelIndex &index, const QVariant &value, int role);
 
diff --git a/src/KCMTelepathyAccounts/parameter-item.cpp b/src/KCMTelepathyAccounts/parameter-item.cpp
index cce0f72..65e4334 100644
--- a/src/KCMTelepathyAccounts/parameter-item.cpp
+++ b/src/KCMTelepathyAccounts/parameter-item.cpp
@@ -49,7 +49,6 @@ ParameterItem::ParameterItem(const Tp::ProtocolParameter &parameter,
 
 ParameterItem::~ParameterItem()
 {
-    //kDebug();
 }
 
 QString ParameterItem::name() const
diff --git a/src/add-account-assistant.cpp b/src/add-account-assistant.cpp
index 59b9c2a..69edc11 100644
--- a/src/add-account-assistant.cpp
+++ b/src/add-account-assistant.cpp
@@ -133,12 +133,12 @@ void AddAccountAssistant::next()
         Tp::ProtocolParameterList parameters = protocolInfo.parameters();
 
         // Add the parameters to the model.
-        ParameterEditModel *model = new ParameterEditModel(this);
-        model->addItems(parameters);
+        ParameterEditModel *parameterModel = new ParameterEditModel(this);
+        parameterModel->addItems(parameters);
 
         // Set up the account edit widget
         d->accountEditWidget = new AccountEditWidget(item->protocolInfo(),
-                                                     model,
+                                                     parameterModel,
                                                      d->pageTwoWidget);
         d->pageTwoWidget->layout()->addWidget(d->accountEditWidget);
 
diff --git a/src/edit-account-dialog.cpp b/src/edit-account-dialog.cpp
index b752f11..9797421 100644
--- a/src/edit-account-dialog.cpp
+++ b/src/edit-account-dialog.cpp
@@ -66,12 +66,12 @@ EditAccountDialog::EditAccountDialog(AccountItem *item, QWidget *parent)
     QVariantMap parameterValues = d->item->account()->parameters();
 
     // Add the parameters to the model.
-    ParameterEditModel *model = new ParameterEditModel(this);
-    model->addItems(parameters, parameterValues);
+    ParameterEditModel *parameterModel = new ParameterEditModel(this);
+    parameterModel->addItems(parameters, parameterValues);
 
     // Set up the interface
     d->widget = new AccountEditWidget(protocolInfo,
-                                      model,
+                                      parameterModel,
                                       this);
     setMainWidget(d->widget);
     setMinimumWidth(400);

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list