[Ktutorial-commits] SF.net SVN: ktutorial:[322] trunk/ktutorial/ktutorial-editor/src/ targetapplic
Status: Alpha
Brought to you by:
danxuliu
|
From: <dan...@us...> - 2011-06-10 18:01:57
|
Revision: 322
http://ktutorial.svn.sourceforge.net/ktutorial/?rev=322&view=rev
Author: danxuliu
Date: 2011-06-10 18:01:50 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Fix making unnecessary service checks when there is no target application running.
Modified Paths:
--------------
trunk/ktutorial/ktutorial-editor/src/targetapplication/TargetApplication.cpp
Modified: trunk/ktutorial/ktutorial-editor/src/targetapplication/TargetApplication.cpp
===================================================================
--- trunk/ktutorial/ktutorial-editor/src/targetapplication/TargetApplication.cpp 2011-06-10 16:33:31 UTC (rev 321)
+++ trunk/ktutorial/ktutorial-editor/src/targetapplication/TargetApplication.cpp 2011-06-10 18:01:50 UTC (rev 322)
@@ -119,6 +119,15 @@
//private slots:
void TargetApplication::checkNewService(const QString& service) {
+ //Do not check new services if there is no target application running. The
+ //slot may still be connected if no service was found for the target
+ //application (for example, if it failed to start, if it did not use D-Bus,
+ //if it was closed before checking the service...)
+ if (!mProcess) {
+ disconnect(QDBusConnection::sessionBus().interface(), 0, this, 0);
+ return;
+ }
+
QDBusInterface mainDBusInterface("org.freedesktop.DBus", "/",
"org.freedesktop.DBus");
if (!mainDBusInterface.isValid()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|