summaryrefslogtreecommitdiff
path: root/TelepathyQt4Yell
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-04-14 03:47:46 -0300
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-04-14 03:47:46 -0300
commit358de1f6cc3fd64bf605f2c6eea5350b01f7ba4a (patch)
treee2ea389de2f387707363d8d3d115ef46d51dcf03 /TelepathyQt4Yell
parent0dabeb0dd6a344c433bc07a9849ad7a4a85dfc61 (diff)
parent0fbfcbaf129735fba98c0efa76044335e6baa974 (diff)
Merge remote-tracking branch 'boiko/my_fixes'
Conflicts: NEWS Reviewed-by: Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
Diffstat (limited to 'TelepathyQt4Yell')
-rw-r--r--TelepathyQt4Yell/Models/accounts-model-item.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/TelepathyQt4Yell/Models/accounts-model-item.cpp b/TelepathyQt4Yell/Models/accounts-model-item.cpp
index 488f51f..ce49f35 100644
--- a/TelepathyQt4Yell/Models/accounts-model-item.cpp
+++ b/TelepathyQt4Yell/Models/accounts-model-item.cpp
@@ -280,7 +280,9 @@ void AccountsModelItem::onContactsChanged(const Tp::Contacts &addedContacts,
newNodes.append(new ContactModelItem(contact));
}
}
- emit childrenAdded(this, newNodes);
+ if (newNodes.count()) {
+ emit childrenAdded(this, newNodes);
+ }
}
void AccountsModelItem::onStatusChanged(Tp::ConnectionStatus status)
@@ -298,7 +300,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;
}