KDE/kdelibs/experimental/knotificationitem

Artur Duque de Souza asouza at kde.org
Thu Jul 16 20:34:07 CEST 2009


SVN commit 997964 by asouza:

Only disconnect the signal if everything was ok. Before we were disconnecting
and connecting again if something went wrong.

CCMAIL: plasma-devel at kde.org


 M  +1 -3      knotificationitem.cpp  


--- trunk/KDE/kdelibs/experimental/knotificationitem/knotificationitem.cpp #997963:997964
@@ -630,14 +630,12 @@
 
     if (notificationItemWatcher->isValid() &&
         notificationItemWatcher->ProtocolVersion() == s_protocolVersion) {
-        QObject::disconnect(notificationItemWatcher, SIGNAL(NotificationHostRegistered()), q, SLOT(registerToDaemon()));
 
         if (notificationItemWatcher->IsNotificationHostRegistered()) {
             kDebug() << "service is" << notificationItemDbus->service();
             notificationItemWatcher->RegisterService(notificationItemDbus->service());
             setLegacySystemTrayEnabled(false);
-        } else {
-            QObject::connect(notificationItemWatcher, SIGNAL(NotificationHostRegistered()), q, SLOT(registerToDaemon()));
+            QObject::disconnect(notificationItemWatcher, SIGNAL(NotificationHostRegistered()), q, SLOT(registerToDaemon()));
         }
     } else {
         kDebug()<<"System tray daemon not reachable or no registered system trays";


More information about the Plasma-devel mailing list