summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Pichorim Boiko <gustavo.boiko@collabora.co.uk>2011-06-06 11:25:34 -0700
committerGustavo Pichorim Boiko <gustavo.boiko@collabora.co.uk>2011-06-06 11:25:38 -0700
commitdfe91afc44e55816947b81deb665da06987067b7 (patch)
treebcc16eabb06749709de3e17374cfbf8552a4c44d
parent922bc1c1fd57c841fc7293673f776ab49638914e (diff)
parent304fa1fc556baebc4adf603f55065ca084696fa9 (diff)
Merge remote branch 'asoliver/status'
Reviewed-by: Gustavo Pichorim Boiko <gustavo.boiko@collabora.co.uk>
-rw-r--r--TelepathyQt4Yell/Models/accounts-model-item.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/TelepathyQt4Yell/Models/accounts-model-item.cpp b/TelepathyQt4Yell/Models/accounts-model-item.cpp
index 1122003..5dc056b 100644
--- a/TelepathyQt4Yell/Models/accounts-model-item.cpp
+++ b/TelepathyQt4Yell/Models/accounts-model-item.cpp
@@ -175,8 +175,14 @@ QVariant AccountsModelItem::data(int role) const
return mPriv->mAccount->requestedPresence().type();
case AccountsModel::RequestedPresenceStatusMessageRole:
return mPriv->mAccount->requestedPresence().statusMessage();
- case AccountsModel::ConnectionStatusRole:
- return mPriv->mAccount->connectionStatus();
+ case AccountsModel::ConnectionStatusRole: {
+ if (!mPriv->mAccount->connection().isNull()
+ && mPriv->mAccount->connection()->isValid()) {
+ return mPriv->mAccount->connection()->status();
+ } else {
+ return Tp::ConnectionStatusDisconnected;
+ }
+ }
case AccountsModel::ConnectionStatusReasonRole:
return mPriv->mAccount->connectionStatusReason();
case AccountsModel::ContactListStateRole: {