[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:05:48 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=7d07e49

The following commit has been merged in the master branch:
commit 7d07e49c1254b90573e724446c003f75753f0751
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
---
 accounts-model-item.cpp | 16 ++++++++++++++--
 accounts-model-item.h   |  1 +
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/accounts-model-item.cpp b/accounts-model-item.cpp
index ad5368b..1d207e7 100644
--- a/accounts-model-item.cpp
+++ b/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/accounts-model-item.h b/accounts-model-item.h
index 65e1c82..7abf409 100644
--- a/accounts-model-item.h
+++ b/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-contact-list packaging



More information about the pkg-kde-commits mailing list