diff options
author | Mateu Batle <mateu.batle@collabora.co.uk> | 2011-06-30 15:46:56 -0500 |
---|---|---|
committer | Mateu Batle <mateu.batle@collabora.co.uk> | 2011-06-30 15:46:56 -0500 |
commit | 5a7c5058fcf6aab1d981c181c3bfbdaee9a11c73 (patch) | |
tree | ab785b613baacba1cee48678e486b30e26277be6 | |
parent | 626deaa49eb8733e8aab5900f369f1293b713ad2 (diff) |
Emit a signal when an account item is added to AccountsModel
Author: Alvaro Soliverez <alvaro.soliverez@collabora.co.uk>
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | TelepathyQt4Yell/Models/accounts-model.cpp | 1 | ||||
-rw-r--r-- | TelepathyQt4Yell/Models/accounts-model.h | 1 |
3 files changed, 3 insertions, 0 deletions
@@ -2,6 +2,7 @@ telepathy-qt4-yell 0.1.x ========================= Enhancements: + * Emit a signal when an account item is added to AccountsModel Fixes: * Report the connection status reason using the Connection object if possible diff --git a/TelepathyQt4Yell/Models/accounts-model.cpp b/TelepathyQt4Yell/Models/accounts-model.cpp index 9de6961..2e655d9 100644 --- a/TelepathyQt4Yell/Models/accounts-model.cpp +++ b/TelepathyQt4Yell/Models/accounts-model.cpp @@ -146,6 +146,7 @@ void AccountsModel::onNewAccount(const Tp::AccountPtr &account) && account->connection()->isValid()) { item->onConnectionChanged(account->connection()); } + emit newAccountItem(account->uniqueIdentifier()); } void AccountsModel::onItemChanged(TreeNode *node) diff --git a/TelepathyQt4Yell/Models/accounts-model.h b/TelepathyQt4Yell/Models/accounts-model.h index 93658ba..1c2ee66 100644 --- a/TelepathyQt4Yell/Models/accounts-model.h +++ b/TelepathyQt4Yell/Models/accounts-model.h @@ -124,6 +124,7 @@ Q_SIGNALS: void accountConnectionStatusChanged(const QString &accountId, int status); // expensive operation, updates all children from parents first .. last void hierarchicalDataChanged(const QModelIndex &first, const QModelIndex &last); + void newAccountItem(const QString &accountId); protected Q_SLOTS: void onLoadAccounts(); |