[Ktutorial-commits] SF.net SVN: ktutorial:[349] trunk/ktutorial/ktutorial-editor/src/ targetapplic
Status: Alpha
Brought to you by:
danxuliu
|
From: <dan...@us...> - 2012-06-27 21:38:04
|
Revision: 349
http://ktutorial.svn.sourceforge.net/ktutorial/?rev=349&view=rev
Author: danxuliu
Date: 2012-06-27 21:37:57 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
Fix a bug when trying to start a target application that uses DBus but does not use Qt. I don't know why, but those applications (for example, Audacity) do not return an error when calling "Introspect" on "/ktutorial" (but they should, as they do not provide the "/ktutorial" DBus object). Instead, they return just an empty node list. So, instead of just checking if there is no error, now it is checked if there is no error and if the string "org.kde.ktutorial.EditorSupport" is found in the reply message (as it is the interface implemented by "/ktutorial").
Unfortunately, no unit test is provided for this problem, as I don't know how to implement a TargetApplicationStub with the behavior shown by those applications.
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 2012-06-27 16:49:40 UTC (rev 348)
+++ trunk/ktutorial/ktutorial-editor/src/targetapplication/TargetApplication.cpp 2012-06-27 21:37:57 UTC (rev 349)
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2011 by Daniel Calviño Sánchez *
+ * Copyright (C) 2010-2012 by Daniel Calviño Sánchez *
* dan...@gm... *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -168,7 +168,8 @@
//Just a generic DBus call to check whether /ktutorial is already available
//or not
QDBusReply<QString> reply = interface.call("Introspect");
- if (!reply.isValid()) {
+ if (!reply.isValid() ||
+ !reply.value().contains("org.kde.ktutorial.EditorSupport")) {
QTimer::singleShot(500, this, SLOT(checkKTutorialSupportModule()));
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|