summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Akulich <akulichalexander@gmail.com>2016-08-31 08:48:52 (GMT)
committerAlexandr Akulich <akulichalexander@gmail.com>2016-09-06 09:21:21 (GMT)
commit3989778fafde7fbf8bf2e4b7b439a0b401050187 (patch)
tree3d7fac7577b236e01c7b4041168a96477149267c
parentc35808f4fefb5f480afa5460e85448361f0b8dcc (diff)
[kpeople] Final initialization step moved from loadCache to constructor
The moved code should be called just once on construction and *not* on each cache load (which is called on (any) account presence changed to offline). REVIEW: 128807
-rw-r--r--kpeople/datasourceplugin/im-persons-data-source.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/kpeople/datasourceplugin/im-persons-data-source.cpp b/kpeople/datasourceplugin/im-persons-data-source.cpp
index 7f1d08e..05eb840 100644
--- a/kpeople/datasourceplugin/im-persons-data-source.cpp
+++ b/kpeople/datasourceplugin/im-persons-data-source.cpp
@@ -117,6 +117,12 @@ KTpAllContacts::KTpAllContacts()
Tp::registerTypes();
loadCache();
+
+ //now start fetching the up-to-date information
+ connect(KTp::accountManager()->becomeReady(), SIGNAL(finished(Tp::PendingOperation*)),
+ this, SLOT(onAccountManagerReady(Tp::PendingOperation*)));
+
+ emitInitialFetchComplete(true);
}
KTpAllContacts::~KTpAllContacts()
@@ -230,12 +236,6 @@ void KTpAllContacts::loadCache(const QString &accountId)
m_contactVCards[uri] = addressee;
}
-
- //now start fetching the up-to-date information
- connect(KTp::accountManager()->becomeReady(), SIGNAL(finished(Tp::PendingOperation*)),
- this, SLOT(onAccountManagerReady(Tp::PendingOperation*)), Qt::UniqueConnection);
-
- emitInitialFetchComplete(true);
}
void KTpAllContacts::onAccountManagerReady(Tp::PendingOperation *op)