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


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

The following commit has been merged in the master branch:
commit 81c26b7fbfb8562916d3acfa81d16d357c527806
Author: Gustavo P. Boiko <gustavo.boiko at kdemail.net>
Date:   Thu Sep 23 13:49:59 2010 +0000

    Make the dialogs modal and use a simpler method to set the config pages' title.
    This commit also makes the editting of accounts a resposibility of the kcm
    module instead of doing that in the item itself.
    
    The sideeffect of this commit is that it also fixes the account list not being
    refreshed sometimes.
    BUG: 252053
    
    svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1178681
---
 KTp/Models/accounts-list-model.cpp | 30 +++++++++---------------------
 KTp/Models/accounts-list-model.h   |  2 +-
 2 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/KTp/Models/accounts-list-model.cpp b/KTp/Models/accounts-list-model.cpp
index 165fb27..e0cf9bd 100644
--- a/KTp/Models/accounts-list-model.cpp
+++ b/KTp/Models/accounts-list-model.cpp
@@ -140,44 +140,32 @@ void AccountsListModel::addAccount(const Tp::AccountPtr &account)
    }
 }
 
-void AccountsListModel::editAccount(const QModelIndex &index)
+void AccountsListModel::removeAccount(const QModelIndex &index)
 {
     kDebug();
 
     if(!index.isValid()) {
-        kWarning() << "Can't edit Account: Invalid index.";
+        kDebug() << "Can't remove Account: Invalid index";
         return;
     }
-
     AccountItem *accountItem = m_readyAccounts.at(index.row());
 
-    if (!accountItem) {
-        kWarning() << "Account item is null.";
-        return;
-    }
-
-      accountItem->disconnect();
-	connect(accountItem, SIGNAL(protocolSelected(QString, QString)),
-		this, SIGNAL(protocolSelected(QString, QString)));
-	connect(this, SIGNAL(setTitleForCustomPages(QString, QList<QString>)),
-			accountItem, SLOT(onTitleForCustomPages(QString, QList<QString>)));
+    Q_ASSERT(accountItem);
 
-    accountItem->edit();
+    accountItem->remove();
 }
 
-void AccountsListModel::removeAccount(const QModelIndex &index)
+AccountItem* AccountsListModel::itemForIndex(const QModelIndex &index)
 {
     kDebug();
 
     if(!index.isValid()) {
-        kDebug() << "Can't remove Account: Invalid index";
-        return;
+        kWarning() << "Invalid index" << index;
+        return 0;
     }
-    AccountItem *accountItem = m_readyAccounts.at(index.row());
 
-    Q_ASSERT(accountItem);
-
-    accountItem->remove();
+    AccountItem *accountItem = m_readyAccounts.at(index.row());
+    return accountItem;
 }
 
 void AccountsListModel::onAccountItemReady()
diff --git a/KTp/Models/accounts-list-model.h b/KTp/Models/accounts-list-model.h
index 9325b5d..815719a 100644
--- a/KTp/Models/accounts-list-model.h
+++ b/KTp/Models/accounts-list-model.h
@@ -40,8 +40,8 @@ public:
     virtual Qt::ItemFlags flags(const QModelIndex &index) const;
     virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
     void addAccount(const Tp::AccountPtr &account);
-    void editAccount(const QModelIndex &index);
     void removeAccount(const QModelIndex &index);
+    AccountItem* itemForIndex(const QModelIndex &index);
 
 Q_SIGNALS:
 	void protocolSelected(QString, QString);

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list