[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:41 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=aa8e0da
The following commit has been merged in the master branch:
commit aa8e0daf13079b099ad1600d26e57696b23803fc
Author: George Goldberg <grundleborg at googlemail.com>
Date: Sat Feb 14 21:28:32 2009 +0000
When an account becomes ready, we should add it to the accessible part of the model.
svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=926228
---
KTp/Models/accounts-list-model.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/KTp/Models/accounts-list-model.cpp b/KTp/Models/accounts-list-model.cpp
index 5870294..e99398c 100644
--- a/KTp/Models/accounts-list-model.cpp
+++ b/KTp/Models/accounts-list-model.cpp
@@ -104,7 +104,18 @@ void AccountsListModel::addAccount(Telepathy::Client::Account *account)
void AccountsListModel::onAccountItemReady()
{
- // TODO: Implement me!
+ AccountItem *item = qobject_cast<AccountItem*>(sender());
+ Q_ASSERT(item);
+ Q_ASSERT(m_unreadyAccounts.contains(item));
+ Q_ASSERT(!m_readyAccounts.contains(item));
+
+ beginInsertRows(QModelIndex(), m_readyAccounts.size(), m_readyAccounts.size()+1);
+ m_readyAccounts.append(item);
+ Q_ASSERT(1==m_unreadyAccounts.removeAll(item));
+ endInsertRows();
+
+ Q_ASSERT(!m_unreadyAccounts.contains(item));
+ Q_ASSERT(m_readyAccounts.contains(item));
}
void AccountsListModel::onAccountItemRemoved()
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list