[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:04:30 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=9bc8c48
The following commit has been merged in the master branch:
commit 9bc8c48e80154c883c367193c0bed56849419130
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Mon Apr 4 01:05:07 2011 +0100
Only load contacts when ContactManager is ready, reduces chance of having an empty contact list on first connect/load.
REVIEW: 101023
Reviewed By: Fransesco Nwokeka
---
models/accounts-model-item.cpp | 16 ++++++++++++++--
models/accounts-model-item.h | 1 +
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/models/accounts-model-item.cpp b/models/accounts-model-item.cpp
index ad5368b..1d207e7 100644
--- a/models/accounts-model-item.cpp
+++ b/models/accounts-model-item.cpp
@@ -306,10 +306,22 @@ void AccountsModelItem::onConnectionChanged(const Tp::ConnectionPtr &connection)
Tp::Channel::GroupMemberChangeDetails)),
SLOT(onContactsChanged(Tp::Contacts,Tp::Contacts)));
- clearContacts();
- addKnownContacts();
+ connect(manager.data(),
+ SIGNAL(stateChanged(Tp::ContactListState)),
+ SLOT(onContactManagerStateChanged(Tp::ContactListState)));
+ onContactManagerStateChanged(manager->state());
}
+void AccountsModelItem::onContactManagerStateChanged(Tp::ContactListState state)
+{
+ if (state == Tp::ContactListStateSuccess) {
+ clearContacts();
+ addKnownContacts();
+ }
+}
+
+
+
void AccountsModelItem::clearContacts()
{
if (!mPriv->mAccount->connection().isNull() &&
diff --git a/models/accounts-model-item.h b/models/accounts-model-item.h
index 65e1c82..7abf409 100644
--- a/models/accounts-model-item.h
+++ b/models/accounts-model-item.h
@@ -65,6 +65,7 @@ private Q_SLOTS:
void onStatusChanged(Tp::ConnectionStatus status);
void onConnectionChanged(const Tp::ConnectionPtr &connection);
+ void onContactManagerStateChanged(Tp::ContactListState state);
void onContactsChanged(const Tp::Contacts &added,
const Tp::Contacts &removed);
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list