Thread: [Ktutorial-commits] SF.net SVN: ktutorial:[321] trunk/ktutorial/ktutorial-editor/src/ targetapplic
Status: Alpha
Brought to you by:
danxuliu
From: <dan...@us...> - 2011-06-10 16:33:38
|
Revision: 321 http://ktutorial.svn.sourceforge.net/ktutorial/?rev=321&view=rev Author: danxuliu Date: 2011-06-10 16:33:31 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Fix making unnecessary connections to the time out signal every time a target application is started. 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:17:10 UTC (rev 320) +++ trunk/ktutorial/ktutorial-editor/src/targetapplication/TargetApplication.cpp 2011-06-10 16:33:31 UTC (rev 321) @@ -99,8 +99,6 @@ mKTutorialSupportModuleDiscoveryTimer.setSingleShot(true); connect(mProcess, SIGNAL(started()), &mKTutorialSupportModuleDiscoveryTimer, SLOT(start())); - connect(&mKTutorialSupportModuleDiscoveryTimer, SIGNAL(timeout()), - this, SLOT(handleTargetApplicationDoesNotSupportKTutorial())); mProcess->start(); } @@ -113,6 +111,9 @@ mProcess(0), mMapper(0), mRemoteEditorSupport(0) { + + connect(&mKTutorialSupportModuleDiscoveryTimer, SIGNAL(timeout()), + this, SLOT(handleTargetApplicationDoesNotSupportKTutorial())); } //private slots: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <dan...@us...> - 2011-06-10 22:20:03
|
Revision: 323 http://ktutorial.svn.sourceforge.net/ktutorial/?rev=323&view=rev Author: danxuliu Date: 2011-06-10 22:19:57 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Delete the KProcess object when the target application failed to start. 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 18:01:50 UTC (rev 322) +++ trunk/ktutorial/ktutorial-editor/src/targetapplication/TargetApplication.cpp 2011-06-10 22:19:57 UTC (rev 323) @@ -188,6 +188,9 @@ mKTutorialSupportModuleDiscoveryTimer.stop(); + mProcess->deleteLater(); + mProcess = 0; + emit startFailed(InvalidPath); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |