summaryrefslogtreecommitdiff
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
parent0dabeb0dd6a344c433bc07a9849ad7a4a85dfc61 (diff)
parent0fbfcbaf129735fba98c0efa76044335e6baa974 (diff)
Merge remote-tracking branch 'boiko/my_fixes'
Conflicts: NEWS Reviewed-by: Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
-rw-r--r--NEWS1
-rw-r--r--TelepathyQt4Yell/Models/accounts-model-item.cpp8
2 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index e9614af..adda7a8 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Enhancements:
Fixes:
* Fix the contact list loading
* Fix filtering of accounts through proxies when the connection status changes
+ * Only emit contacts added and removed signals if there are contacts actually being added/removed
telepathy-qt4-yell 0.1.1 (2011-02-16)
======================================
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;
}