summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Klapetek <martin.klapetek@gmail.com>2011-03-12 00:51:59 +0100
committerGustavo Pichorim Boiko <gustavo.boiko@collabora.co.uk>2011-04-13 07:31:34 -0700
commite09615162161de13f6897f72516efc3670adc5fc (patch)
treeb5a7c71e5d8e04afe2620195e8d58cf0dbe713a9
parent4b8a1f6243bd7f6917be6bbfb227475a319dff5c (diff)
If the account is already connected when the model is being created, load all contacts
-rw-r--r--TelepathyQt4Yell/Models/accounts-model-item.cpp1
-rw-r--r--TelepathyQt4Yell/Models/accounts-model-item.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/TelepathyQt4Yell/Models/accounts-model-item.cpp b/TelepathyQt4Yell/Models/accounts-model-item.cpp
index 9320112..d6ba4e6 100644
--- a/TelepathyQt4Yell/Models/accounts-model-item.cpp
+++ b/TelepathyQt4Yell/Models/accounts-model-item.cpp
@@ -68,6 +68,7 @@ AccountsModelItem::AccountsModelItem(const Tp::AccountPtr &account)
SIGNAL(allKnownContactsChanged(Tp::Contacts,Tp::Contacts,
Tp::Channel::GroupMemberChangeDetails)),
SLOT(onContactsChanged(Tp::Contacts,Tp::Contacts)));
+ QTimer::singleShot(0, this, SLOT(addKnownContacts()));
}
connect(mPriv->mAccount.data(),
diff --git a/TelepathyQt4Yell/Models/accounts-model-item.h b/TelepathyQt4Yell/Models/accounts-model-item.h
index 3f5b092..2befa0e 100644
--- a/TelepathyQt4Yell/Models/accounts-model-item.h
+++ b/TelepathyQt4Yell/Models/accounts-model-item.h
@@ -55,6 +55,8 @@ public:
Q_INVOKABLE void setRequestedPresence(int type, const QString &status, const QString &statusMessage);
void clearContacts();
+
+public Q_SLOTS:
void addKnownContacts();
Q_SIGNALS: