summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Pichorim Boiko <gustavo.boiko@collabora.co.uk>2011-04-01 14:49:50 -0700
committerGustavo Pichorim Boiko <gustavo.boiko@collabora.co.uk>2011-04-13 07:44:25 -0700
commit57200d715e672fa36b3c7381d7c01cfc0e96fdcc (patch)
tree9d37702fb5d8a871f5adadbc325d475e82782cc9
parent0f62f8464cbf7e7a36efeabd0adc94a1ff8bd300 (diff)
Only emit the childrenRemoved signal if the item has any child to be removed
-rw-r--r--TelepathyQt4Yell/Models/accounts-model-item.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/TelepathyQt4Yell/Models/accounts-model-item.cpp b/TelepathyQt4Yell/Models/accounts-model-item.cpp
index 95c4e89..183e819 100644
--- a/TelepathyQt4Yell/Models/accounts-model-item.cpp
+++ b/TelepathyQt4Yell/Models/accounts-model-item.cpp
@@ -301,7 +301,9 @@ void AccountsModelItem::onConnectionChanged(const Tp::ConnectionPtr &connection)
if (connection.isNull()
|| !connection->isValid()
|| connection->status() == Tp::ConnectionStatusDisconnected) {
- emit childrenRemoved(this, 0, size() - 1);
+ if (size() > 0) {
+ emit childrenRemoved(this, 0, size() - 1);
+ }
return;
}