[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:01:00 UTC 2016


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

The following commit has been merged in the master branch:
commit 7372dfc2724de462aa24b1a910f0e307b7709a33
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Wed Dec 28 09:39:11 2011 +0100

    Use Q_FOREACH instead of foreach
---
 plugins/haze/skype-main-options-widget.cpp               |  2 +-
 .../abstract-account-parameters-widget.cpp               |  2 +-
 src/KCMTelepathyAccounts/abstract-account-ui-plugin.cpp  |  2 +-
 src/KCMTelepathyAccounts/abstract-account-ui.cpp         |  2 +-
 src/KCMTelepathyAccounts/account-edit-widget.cpp         |  4 ++--
 .../generic-advanced-options-widget.cpp                  |  4 ++--
 src/KCMTelepathyAccounts/parameter-edit-model.cpp        | 16 ++++++++--------
 src/KCMTelepathyAccounts/plugin-manager.cpp              |  2 +-
 src/KCMTelepathyAccounts/profile-list-model.cpp          |  6 +++---
 src/accounts-list-model.cpp                              |  2 +-
 src/add-account-assistant.cpp                            |  2 +-
 src/kcm-telepathy-accounts.cpp                           |  2 +-
 12 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/plugins/haze/skype-main-options-widget.cpp b/plugins/haze/skype-main-options-widget.cpp
index 38045c6..6acdcf6 100644
--- a/plugins/haze/skype-main-options-widget.cpp
+++ b/plugins/haze/skype-main-options-widget.cpp
@@ -42,7 +42,7 @@ SkypeMainOptionsWidget::SkypeMainOptionsWidget(ParameterEditModel *model, QWidge
     QFileInfoList folderList = skypeConfigDir.entryInfoList();
 
     KCompletion *completion = new KCompletion;
-    foreach (const QFileInfo info, folderList){
+    Q_FOREACH (const QFileInfo &info, folderList) {
         completion->addItem(info.fileName());
     }
     m_ui->accountLineEdit->setCompletionObject(completion);
diff --git a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
index 07f323d..553d632 100644
--- a/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-parameters-widget.cpp
@@ -108,7 +108,7 @@ void AbstractAccountParametersWidget::handleParameter(const QString &parameterNa
         // hide widgets because they are not needed
         kDebug() << "Field" << parameterName << "hidden";
         dataWidget->hide();
-        foreach(QWidget *label, labelWidgets) {
+        Q_FOREACH (QWidget *label, labelWidgets) {
             if(label) {
                 label->hide();
             }
diff --git a/src/KCMTelepathyAccounts/abstract-account-ui-plugin.cpp b/src/KCMTelepathyAccounts/abstract-account-ui-plugin.cpp
index 5be368c..bc2074b 100644
--- a/src/KCMTelepathyAccounts/abstract-account-ui-plugin.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-ui-plugin.cpp
@@ -53,7 +53,7 @@ void AbstractAccountUiPlugin::registerProvidedProtocol(const QString &connection
                                                        const QString &protocol)
 {
     // Check the protocol is not already entered
-    foreach (const QString &value, d->providedProtocols.values(connectionManager)) {
+    Q_FOREACH (const QString &value, d->providedProtocols.values(connectionManager)) {
         if (value == protocol) {
             kWarning() << "Tried to add connection manager:" << connectionManager
                        << "and protocol:" << protocol << "combination twice.";
diff --git a/src/KCMTelepathyAccounts/abstract-account-ui.cpp b/src/KCMTelepathyAccounts/abstract-account-ui.cpp
index 2a3fc39..252117b 100644
--- a/src/KCMTelepathyAccounts/abstract-account-ui.cpp
+++ b/src/KCMTelepathyAccounts/abstract-account-ui.cpp
@@ -65,7 +65,7 @@ const QMap<QString, QVariant::Type> &AbstractAccountUi::supportedParameters() co
 void AbstractAccountUi::registerSupportedParameter(const QString &name, QVariant::Type type)
 {
     // Check that the parameter is not already in the list
-    foreach (QVariant::Type t, d->supportedParameters.values(name)) {
+    Q_FOREACH (QVariant::Type t, d->supportedParameters.values(name)) {
         if (t == type) {
             kWarning() << "Parameter:" << name << "of type:" << type << "is already added.";
             return;
diff --git a/src/KCMTelepathyAccounts/account-edit-widget.cpp b/src/KCMTelepathyAccounts/account-edit-widget.cpp
index f881dee..8a7f715 100644
--- a/src/KCMTelepathyAccounts/account-edit-widget.cpp
+++ b/src/KCMTelepathyAccounts/account-edit-widget.cpp
@@ -132,7 +132,7 @@ void AccountEditWidget::loadWidgets()
 {
     Tp::ProtocolParameterList mandatoryParameters;
 
-    foreach (const Tp::ProtocolParameter &parameter, d->parameterModel->parameters()) {
+    Q_FOREACH (const Tp::ProtocolParameter &parameter, d->parameterModel->parameters()) {
         if (parameter.isRequired()) {
             mandatoryParameters.append(parameter);
         }
@@ -158,7 +158,7 @@ void AccountEditWidget::loadWidgets()
         QMap<QString, QVariant::Type> params = d->accountUi->supportedParameters();
         QMap<QString, QVariant::Type>::const_iterator paramIter = params.constBegin();
         while(paramIter != params.constEnd()) {
-            foreach (const Tp::ProtocolParameter &parameter, d->parameterModel->parameters()) {
+            Q_FOREACH (const Tp::ProtocolParameter &parameter, d->parameterModel->parameters()) {
                 if ((parameter.name() == paramIter.key()) &&
                     (parameter.type() == paramIter.value())) {
                     mandatoryParameters.removeAll(parameter);
diff --git a/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp b/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
index 6a354d9..461791e 100644
--- a/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
+++ b/src/KCMTelepathyAccounts/generic-advanced-options-widget.cpp
@@ -55,7 +55,7 @@ GenericAdvancedOptionsWidget::~GenericAdvancedOptionsWidget()
 bool GenericAdvancedOptionsWidget::validateParameterValues()
 {
     // validate one tab at a time so that the user is not flooded with dialogs
-    foreach(AbstractAccountParametersWidget *widget, d->widgets) {
+    Q_FOREACH (AbstractAccountParametersWidget *widget, d->widgets) {
         if (!widget->validateParameterValues())
         return false;
     }
@@ -70,7 +70,7 @@ void GenericAdvancedOptionsWidget::setTabBarHidden(bool hidden)
 
 void GenericAdvancedOptionsWidget::submit()
 {
-    foreach(AbstractAccountParametersWidget *widget, d->widgets) {
+    Q_FOREACH (AbstractAccountParametersWidget *widget, d->widgets) {
         widget->submit();
     }
 
diff --git a/src/KCMTelepathyAccounts/parameter-edit-model.cpp b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
index 4051098..6bce9c8 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-model.cpp
+++ b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
@@ -179,7 +179,7 @@ QModelIndex ParameterEditModel::indexForParameter(const Tp::Profile::Parameter &
 
 Tp::ProtocolParameter ParameterEditModel::parameter(const QString &parameterName) const
 {
-    foreach(ParameterItem* item, m_items) {
+    Q_FOREACH (ParameterItem* item, m_items) {
         if(item->parameter().name() == parameterName) {
             return item->parameter();
         }
@@ -192,7 +192,7 @@ Tp::ProtocolParameter ParameterEditModel::parameter(const QString &parameterName
 void ParameterEditModel::addItem(const Tp::ProtocolParameter &parameter, const Tp::Profile::Parameter &profileParameter, const QVariant &originalValue)
 {
     // Check we are not creating duplicate items.
-    foreach (const ParameterItem *item, m_items) {
+    Q_FOREACH (const ParameterItem *item, m_items) {
         if(item->parameter() == parameter) {
             return;
         }
@@ -206,12 +206,12 @@ void ParameterEditModel::addItem(const Tp::ProtocolParameter &parameter, const T
 
 void ParameterEditModel::addItems(const Tp::ProtocolParameterList &parameters, const Tp::Profile::ParameterList &profileParameters, const QVariantMap &parameterValues)
 {
-    foreach (const Tp::ProtocolParameter &parameter, parameters) {
+    Q_FOREACH (const Tp::ProtocolParameter &parameter, parameters) {
 
         Tp::Profile::Parameter relevantProfileParameter;
 
         //try and find the correct profile parameter, if it can't be found leave it as empty.
-        foreach (const Tp::Profile::Parameter &profileParameter, profileParameters) {
+        Q_FOREACH (const Tp::Profile::Parameter &profileParameter, profileParameters) {
             if (profileParameter.name() == parameter.name()) {
                 relevantProfileParameter = profileParameter;
                 break;
@@ -226,7 +226,7 @@ Tp::ProtocolParameterList ParameterEditModel::parameters() const
 {
     Tp::ProtocolParameterList parameters;
 
-    foreach (ParameterItem *item, m_items) {
+    Q_FOREACH (ParameterItem *item, m_items) {
         parameters.append(item->parameter());
     }
 
@@ -236,7 +236,7 @@ Tp::ProtocolParameterList ParameterEditModel::parameters() const
 QVariantMap ParameterEditModel::parametersSet() const
 {
     QVariantMap setParameters;
-    foreach (ParameterItem *item, m_items) {
+    Q_FOREACH (ParameterItem *item, m_items) {
         Tp::ProtocolParameter parameter = item->parameter();
         QVariant value = item->value();
 
@@ -253,7 +253,7 @@ QVariantMap ParameterEditModel::parametersSet() const
 QStringList ParameterEditModel::parametersUnset() const
 {
     QStringList unsetParameters;
-    foreach (ParameterItem *item, m_items) {
+    Q_FOREACH (ParameterItem *item, m_items) {
         Tp::ProtocolParameter parameter = item->parameter();
         QVariant value = item->value();
 
@@ -297,7 +297,7 @@ bool ParameterEditModel::parameterNeedsSaving(const Tp::ProtocolParameter &param
 
 bool ParameterEditModel::validateParameterValues()
 {
-    foreach (ParameterItem *item, m_items) {
+    Q_FOREACH (ParameterItem *item, m_items) {
         if (item->validity() != QValidator::Acceptable) {
            emit feedbackMessage(i18n("Parameter \"<b>%1</b>\" is not valid.",
                                 item->localizedName()),
diff --git a/src/KCMTelepathyAccounts/plugin-manager.cpp b/src/KCMTelepathyAccounts/plugin-manager.cpp
index 58e4608..09b13f4 100644
--- a/src/KCMTelepathyAccounts/plugin-manager.cpp
+++ b/src/KCMTelepathyAccounts/plugin-manager.cpp
@@ -88,7 +88,7 @@ AbstractAccountUi *PluginManager::accountUiForProtocol(const QString &connection
     // Loop through all the plugins seeing if they provide an AccountUi for the connection manager
     // and protocol combination we were provided with.
 
-    foreach (AbstractAccountUiPlugin *plugin, m_plugins) {
+    Q_FOREACH (AbstractAccountUiPlugin *plugin, m_plugins) {
         AbstractAccountUi *ui = plugin->accountUi(connectionManager, protocol, serviceName);
 
         // FIXME: Bug https://bugs.kde.org/201797 - we should check here to see which plugin
diff --git a/src/KCMTelepathyAccounts/profile-list-model.cpp b/src/KCMTelepathyAccounts/profile-list-model.cpp
index 0e69ecb..ea5385e 100644
--- a/src/KCMTelepathyAccounts/profile-list-model.cpp
+++ b/src/KCMTelepathyAccounts/profile-list-model.cpp
@@ -92,7 +92,7 @@ ProfileItem *ProfileListModel::itemForIndex(const QModelIndex &index) const
 bool ProfileListModel::hasNonFakeProfile(const Tp::ProfilePtr& profile, const QList<Tp::ProfilePtr> &profiles) const
 {
     //loop through all profiles, and look for a non autogenerated profile which matches this name.
-    foreach(const Tp::ProfilePtr &otherProfile, profiles) {
+    Q_FOREACH (const Tp::ProfilePtr &otherProfile, profiles) {
         if(profile->protocolName() == otherProfile->protocolName() && !otherProfile->isFake())
         {
             // check if this profile is for a special service or for this protocol in general
@@ -112,7 +112,7 @@ bool ProfileListModel::hasNonFakeProfile(const Tp::ProfilePtr& profile, const QL
 
 void ProfileListModel::populateList()
 {
-    foreach (ProfileItem *item, m_profileItems) {
+    Q_FOREACH (ProfileItem *item, m_profileItems) {
         delete item;
         item = 0;
     }
@@ -122,7 +122,7 @@ void ProfileListModel::populateList()
     QList<Tp::ProfilePtr> profiles = m_profileManager->profiles();
 
     QList<ProfileItem*> insertItems;
-    foreach(const Tp::ProfilePtr &profile, profiles) {
+    Q_FOREACH (const Tp::ProfilePtr &profile, profiles) {
         if(profile->isFake()) {
             if(hasNonFakeProfile(profile, profiles)) {
                 continue;
diff --git a/src/accounts-list-model.cpp b/src/accounts-list-model.cpp
index 3008c89..0a9559d 100644
--- a/src/accounts-list-model.cpp
+++ b/src/accounts-list-model.cpp
@@ -161,7 +161,7 @@ void AccountsListModel::addAccount(const Tp::AccountPtr &account)
     bool found = false;
 
     if (!found) {
-        foreach (const AccountItem* ai, m_accounts) {
+        Q_FOREACH (const AccountItem* ai, m_accounts) {
             if (ai->account() == account) {
                 found = true;
                 break;
diff --git a/src/add-account-assistant.cpp b/src/add-account-assistant.cpp
index 732ce9d..0cebd29 100644
--- a/src/add-account-assistant.cpp
+++ b/src/add-account-assistant.cpp
@@ -201,7 +201,7 @@ void AddAccountAssistant::accept()
     }
 
     // Check account we're trying to create doesn't already exist
-    foreach (Tp::AccountPtr account, d->accountManager->allAccounts()) {
+    Q_FOREACH (const Tp::AccountPtr &account, d->accountManager->allAccounts()) {
         if (values.value("account") == account->displayName()
             && d->currentProfileItem->protocolName() == account->protocolName()) {
             Q_EMIT feedbackMessage(i18n("Failed to create account"),
diff --git a/src/kcm-telepathy-accounts.cpp b/src/kcm-telepathy-accounts.cpp
index ca336ad..792fb7a 100644
--- a/src/kcm-telepathy-accounts.cpp
+++ b/src/kcm-telepathy-accounts.cpp
@@ -230,7 +230,7 @@ void KCMTelepathyAccounts::onAccountManagerReady(Tp::PendingOperation *op)
 
     // Add all the accounts to the Accounts Model.
     QList<Tp::AccountPtr> accounts = m_accountManager->allAccounts();
-    foreach (Tp::AccountPtr account, accounts) {
+    Q_FOREACH (const Tp::AccountPtr &account, accounts) {
         m_accountsListModel->addAccount(account);
     }
 

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list