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


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

The following commit has been merged in the master branch:
commit 14e98cd1985e27aa06b33a165d195e22db117752
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Thu Dec 29 14:37:48 2011 +0100

    More cleanup
---
 plugins/rakia/rakia-account-ui-plugin.cpp         |  2 +-
 src/KCMTelepathyAccounts/parameter-edit-model.cpp |  3 +-
 src/KCMTelepathyAccounts/profile-list-model.cpp   | 12 +++----
 src/KCMTelepathyAccounts/validated-line-edit.cpp  | 38 +++++++++++------------
 src/accounts-list-model.cpp                       |  6 ++--
 src/salut-details-dialog.cpp                      |  3 +-
 6 files changed, 27 insertions(+), 37 deletions(-)

diff --git a/plugins/rakia/rakia-account-ui-plugin.cpp b/plugins/rakia/rakia-account-ui-plugin.cpp
index 79a9717..f29f494 100644
--- a/plugins/rakia/rakia-account-ui-plugin.cpp
+++ b/plugins/rakia/rakia-account-ui-plugin.cpp
@@ -49,7 +49,7 @@ AbstractAccountUi* RakiaAccountUiPlugin::accountUi(const QString &connectionMana
 
     // We support rakia/sip and the renamed version rakia/sip combination.
     if (((connectionManager == QLatin1String("rakia"))    && (protocol == QLatin1String("sip"))) ||
-       ((connectionManager == QLatin1String("sofiasip")) && (protocol == QLatin1String("sip")))
+        ((connectionManager == QLatin1String("sofiasip")) && (protocol == QLatin1String("sip")))
       ) {
         return new RakiaAccountUi;
     }
diff --git a/src/KCMTelepathyAccounts/parameter-edit-model.cpp b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
index 6f894a2..1e25138 100644
--- a/src/KCMTelepathyAccounts/parameter-edit-model.cpp
+++ b/src/KCMTelepathyAccounts/parameter-edit-model.cpp
@@ -65,8 +65,7 @@ QVariant ParameterEditModel::data(const QModelIndex &index, int role) const
     // on while developing this code further. Needs expanding.
     QVariant data;
 
-    switch(role)
-    {
+    switch(role) {
     case Qt::DisplayRole:
     case Qt::EditRole:
     case ParameterEditModel::ValueRole:
diff --git a/src/KCMTelepathyAccounts/profile-list-model.cpp b/src/KCMTelepathyAccounts/profile-list-model.cpp
index 328a361..8ddc2e1 100644
--- a/src/KCMTelepathyAccounts/profile-list-model.cpp
+++ b/src/KCMTelepathyAccounts/profile-list-model.cpp
@@ -56,8 +56,7 @@ QVariant ProfileListModel::data(const QModelIndex &index, int role) const
     // on while developing this code further. Needs expanding.
     QVariant data;
 
-    switch(role)
-    {
+    switch (role) {
     case Qt::DisplayRole:
         data = QVariant(m_profileItems.at(index.row())->localizedName());
         break;
@@ -93,8 +92,7 @@ bool ProfileListModel::hasNonFakeProfile(const Tp::ProfilePtr& profile, const QL
 {
     //loop through all profiles, and look for a non autogenerated profile which matches this name.
     Q_FOREACH (const Tp::ProfilePtr &otherProfile, profiles) {
-        if (profile->protocolName() == otherProfile->protocolName() && !otherProfile->isFake())
-        {
+        if (profile->protocolName() == otherProfile->protocolName() && !otherProfile->isFake()) {
             // check if this profile is for a special service or for this protocol in general
             if (otherProfile->serviceName() == otherProfile->cmName().append(QLatin1Char('-')).append(otherProfile->protocolName())
             || otherProfile->serviceName() == otherProfile->protocolName()) {
@@ -137,13 +135,11 @@ void ProfileListModel::populateList()
         insertItems.append(new ProfileItem(profile, this));
     }
 
-    if ( insertItems.size() > 0 )
-    {
+    if ( insertItems.size() > 0 ) {
       beginInsertRows(QModelIndex(), 0, insertItems.size()-1);
       m_profileItems.append(insertItems);
       endInsertRows();
-    }
-    else {
+    } else {
       return;
     }
 }
diff --git a/src/KCMTelepathyAccounts/validated-line-edit.cpp b/src/KCMTelepathyAccounts/validated-line-edit.cpp
index dd11790..d808137 100644
--- a/src/KCMTelepathyAccounts/validated-line-edit.cpp
+++ b/src/KCMTelepathyAccounts/validated-line-edit.cpp
@@ -115,24 +115,23 @@ ValidatedLineEdit::~ValidatedLineEdit()
 
 void ValidatedLineEdit::setValidator(PredefinedValidator validator)
 {
-    switch(validator)
-    {
-        case NotEmptyValidator:
-            setValidator(QLatin1String(".+"),
-                         i18n("This field should not be empty"));
-            break;
-        case EmailValidator:
-            setValidator(QLatin1String("[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}"),
-                         i18n("This field should contain an email address"));
-            break;
-        case HostnameValidator:
-            setValidator(QLatin1String(".+\..+"),
-                         i18n("This field should contain a hostname"));
-            break;
-        case IPAddressValidator:
-            setValidator(QLatin1String("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"),
-                         i18n("This field should contain an IP address"));
-            break;
+    switch(validator) {
+    case NotEmptyValidator:
+        setValidator(QLatin1String(".+"),
+                     i18n("This field should not be empty"));
+        break;
+    case EmailValidator:
+        setValidator(QLatin1String("[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}"),
+                     i18n("This field should contain an email address"));
+        break;
+    case HostnameValidator:
+        setValidator(QLatin1String(".+\..+"),
+                     i18n("This field should contain a hostname"));
+        break;
+    case IPAddressValidator:
+        setValidator(QLatin1String("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"),
+                     i18n("This field should contain an IP address"));
+        break;
     }
 }
 
@@ -180,8 +179,7 @@ void ValidatedLineEdit::validate()
             d->currentIcon = ValidationIconWidget::ValidIcon;
             d->currentState = QValidator::Acceptable;
         }
-    }
-    else if (d->currentIcon != ValidationIconWidget::InvalidIcon) {
+    } else if (d->currentIcon != ValidationIconWidget::InvalidIcon) {
         d->validationIcon->setPixmap(SmallIcon(QLatin1String("dialog-error"), 0));
         this->setToolTip(d->errorMessage);
         d->currentIcon = ValidationIconWidget::InvalidIcon;
diff --git a/src/accounts-list-model.cpp b/src/accounts-list-model.cpp
index 469cb9d..f8f7806 100644
--- a/src/accounts-list-model.cpp
+++ b/src/accounts-list-model.cpp
@@ -67,8 +67,7 @@ QVariant AccountsListModel::data(const QModelIndex &index, int role) const
     QVariant data;
     Tp::AccountPtr account = m_accounts.at(index.row())->account();
 
-    switch(role)
-    {
+    switch(role) {
     case Qt::DisplayRole:
         data = QVariant(account->displayName());
         break;
@@ -80,8 +79,7 @@ QVariant AccountsListModel::data(const QModelIndex &index, int role) const
     case Qt::CheckStateRole:
         if (account->isEnabled()) {
             data = QVariant(Qt::Checked);
-        }
-        else {
+        } else {
             data = QVariant(Qt::Unchecked);
         }
         break;
diff --git a/src/salut-details-dialog.cpp b/src/salut-details-dialog.cpp
index a95f2fc..f95826d 100644
--- a/src/salut-details-dialog.cpp
+++ b/src/salut-details-dialog.cpp
@@ -69,8 +69,7 @@ SalutDetailsDialog::SalutDetailsDialog(const Tp::ProfileManagerPtr profileManage
     Q_ASSERT(!d->profile.isNull());
     Q_ASSERT(d->profile->isValid());
     Q_ASSERT(d->profile->protocolName() == QLatin1String("local-xmpp"));
-    if (d->profile.isNull() || !d->profile->isValid() || d->profile->protocolName() != QLatin1String("local-xmpp"))
-    {
+    if (d->profile.isNull() || !d->profile->isValid() || d->profile->protocolName() != QLatin1String("local-xmpp")) {
         kWarning() << "Something went wrong with telepathy salut";
     }
 

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list