[Telepathy-commits] [telepathy-qt4/master] Avoid unnecessary signals if old state is equal to new state
Stefan Eilers
stefan.eilers at basyskom.de
Tue Jan 27 06:22:08 PST 2009
---
TelepathyQt4/Prototype/Connection.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/TelepathyQt4/Prototype/Connection.cpp b/TelepathyQt4/Prototype/Connection.cpp
index 0d5111a..39e8e12 100644
--- a/TelepathyQt4/Prototype/Connection.cpp
+++ b/TelepathyQt4/Prototype/Connection.cpp
@@ -294,7 +294,10 @@ void Connection::slotStatusChanged( uint status, uint reason )
d->m_status = static_cast<Telepathy::ConnectionStatus>( status );
d->m_reason = static_cast<Telepathy::ConnectionStatusReason>( reason );
- emit signalStatusChanged( this, d->m_status, old_status );
+ if ( d->m_status != old_status )
+ {
+ emit signalStatusChanged( this, d->m_status, old_status );
+ }
if ( account() && account()->parameters().value( "register") == true )
{
--
1.5.6.5
More information about the Telepathy-commits
mailing list