[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:05:46 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=f3a523c

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

    Fix Martin's issues and some more cleanup
---
 KTp/Models/accounts-list-model.cpp | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/KTp/Models/accounts-list-model.cpp b/KTp/Models/accounts-list-model.cpp
index b8f671e..469cb9d 100644
--- a/KTp/Models/accounts-list-model.cpp
+++ b/KTp/Models/accounts-list-model.cpp
@@ -60,7 +60,7 @@ int AccountsListModel::columnCount(const QModelIndex& parent) const
 
 QVariant AccountsListModel::data(const QModelIndex &index, int role) const
 {
-    if(!index.isValid()) {
+    if (!index.isValid()) {
         return QVariant();
     }
 
@@ -78,7 +78,7 @@ QVariant AccountsListModel::data(const QModelIndex &index, int role) const
         break;
 
     case Qt::CheckStateRole:
-        if(account->isEnabled()) {
+        if (account->isEnabled()) {
             data = QVariant(Qt::Checked);
         }
         else {
@@ -119,10 +119,10 @@ QVariant AccountsListModel::data(const QModelIndex &index, int role) const
 
 bool AccountsListModel::setData(const QModelIndex &index, const QVariant &value, int role)
 {
-    if(!index.isValid()) {
+    if (!index.isValid()) {
         return false;
     }
-    if(role == Qt::CheckStateRole) {
+    if (role == Qt::CheckStateRole) {
         //this is index from QSortFilterProxyModel
         index.data(AccountItemRole).value<AccountItem*>()->account()->setEnabled(value.toInt() == Qt::Checked);
         return true;
@@ -133,11 +133,11 @@ bool AccountsListModel::setData(const QModelIndex &index, const QVariant &value,
 
 QModelIndex AccountsListModel::index(int row, int column, const QModelIndex& parent) const
 {
-    if(row < 0 || column < 0 || parent != QModelIndex()) {
+    if (row < 0 || column < 0 || parent != QModelIndex()) {
         return QModelIndex();
     }
 
-    if(row < rowCount() && column < columnCount()) {
+    if (row < rowCount() && column < columnCount()) {
         return createIndex(row, column);
     }
 
@@ -147,7 +147,7 @@ QModelIndex AccountsListModel::index(int row, int column, const QModelIndex& par
 
 Qt::ItemFlags AccountsListModel::flags(const QModelIndex &index) const
 {
-    if(!index.isValid()) {
+    if (!index.isValid()) {
         return QAbstractItemModel::flags(index);
     }
     return QAbstractItemModel::flags(index) | Qt::ItemIsUserCheckable;
@@ -161,7 +161,7 @@ void AccountsListModel::addAccount(const Tp::AccountPtr &account)
     bool found = false;
 
     if (!found) {
-        Q_FOREACH (const AccountItem* ai, m_accounts) {
+        Q_FOREACH (const AccountItem *ai, m_accounts) {
             if (ai->account() == account) {
                 found = true;
                 break;
@@ -190,7 +190,7 @@ void AccountsListModel::addAccount(const Tp::AccountPtr &account)
 
 void AccountsListModel::removeAccount(const QModelIndex &index)
 {
-    if(!index.isValid()) {
+    if (!index.isValid()) {
         kDebug() << "Can't remove Account: Invalid index";
         return;
     }
@@ -203,7 +203,7 @@ void AccountsListModel::removeAccount(const QModelIndex &index)
 
 AccountItem* AccountsListModel::itemForIndex(const QModelIndex &index)
 {
-    if(!index.isValid()) {
+    if (!index.isValid()) {
         kWarning() << "Invalid index" << index;
         return 0;
     }

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list