[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeplasma-addons/applets/incomingmsg
From:       Davide Bettio <davide.bettio () kdemail ! net>
Date:       2008-12-21 23:08:09
Message-ID: 1229900889.545240.16232.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 899984 by bettio:

Check as first thing if xchat service is running.
BUG: 178304


 M  +3 -5      incomingmsg.cpp  


--- trunk/KDE/kdeplasma-addons/applets/incomingmsg/incomingmsg.cpp #899983:899984
@@ -28,6 +28,7 @@
 #include <QtCore/QProcess>
 #include <QtDBus/QDBusInterface>
 #include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusConnectionInterface>
 #include <QtDBus/QDBusReply>
 #include <QtGui/QFontMetrics>
 #include <QtGui/QFrame>
@@ -201,11 +202,8 @@
     // we need to hook it up first. this first call is not only for interface \
testing but also for  // setup.
     if (mShowXChat) {
-        QDBusInterface xchatDBusTest("org.xchat.service", "/org/xchat/Remote", \
                "org.xchat.plugin");
-        QDBusReply<void> xchatReply = xchatDBusTest.call("HookPrint", "Channel Msg \
                Hilight", 0, 0);
-        if (!xchatReply.isValid())
-            kDebug() << "XChat DBus interface test error: " << xchatReply.error();
-        else {
+        QDBusReply<bool> reply = \
QDBusConnection::sessionBus().interface()->isServiceRegistered("org.xchat.service"); \
+        if (reply.isValid() && reply.value()){  QDBusConnection mDBus = \
QDBusConnection::sessionBus();  if (!mDBus.connect("org.xchat.service", \
"/org/xchat/Remote",  "org.xchat.plugin", "PrintSignal",


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic