[Telepathy-commits] [telepathy-qt4/master] Contact: Make sure subscription/publishStateChanged is not emitted if nothing happened.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Fri Feb 27 12:39:02 PST 2009
---
TelepathyQt4/Client/contact.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/TelepathyQt4/Client/contact.cpp b/TelepathyQt4/Client/contact.cpp
index 504b7ef..fd958d4 100644
--- a/TelepathyQt4/Client/contact.cpp
+++ b/TelepathyQt4/Client/contact.cpp
@@ -316,12 +316,18 @@ void Contact::receiveSimplePresence(const SimplePresence &presence)
void Contact::setSubscriptionState(Contact::PresenceState state)
{
+ if (mPriv->subscriptionState == state) {
+ return;
+ }
mPriv->subscriptionState = state;
emit subscriptionStateChanged(state);
}
void Contact::setPublishState(Contact::PresenceState state)
{
+ if (mPriv->publishState == state) {
+ return;
+ }
mPriv->publishState = state;
emit publishStateChanged(state);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list