summaryrefslogtreecommitdiff
path: root/src/plugins/qnx/qnxruncontrolfactory.cpp
diff options
context:
space:
mode:
authorAndreas Holzammer <andreas.holzammer@kdab.com>2013-03-28 08:14:09 +0100
committerTobias Nätterlund <tobias.naetterlund@kdab.com>2013-04-24 10:44:44 +0200
commitbd4105def7c361f1bb80540f18005116a3cb4dbe (patch)
tree732d8b4a26a53b0900905ac480511598f924767c /src/plugins/qnx/qnxruncontrolfactory.cpp
parent2a8a411b214a42a17b188d032865dc722e10eb99 (diff)
downloadqt-creator-bd4105def7c361f1bb80540f18005116a3cb4dbe.tar.gz
QNX: Enable QML debugging for pure QNX devices
This includes fixing the application arguments when launching the application through gdb. As the application is launched by passing it as an argument to -exec-run (or run), the application arguments needs to go in the same command. -exec-run won't care about arguments set with -exec-arguments when being passed the application binary. Change-Id: I869acbedd2593a931bf5c3d88559ea2bda2c3ff1 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Diffstat (limited to 'src/plugins/qnx/qnxruncontrolfactory.cpp')
-rw-r--r--src/plugins/qnx/qnxruncontrolfactory.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/qnx/qnxruncontrolfactory.cpp b/src/plugins/qnx/qnxruncontrolfactory.cpp
index dd511f3b9c..34794d46ee 100644
--- a/src/plugins/qnx/qnxruncontrolfactory.cpp
+++ b/src/plugins/qnx/qnxruncontrolfactory.cpp
@@ -41,8 +41,11 @@
#include <debugger/debuggerengine.h>
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunner.h>
+#include <debugger/debuggerrunconfigurationaspect.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerkitinformation.h>
+#include <projectexplorer/buildconfiguration.h>
+#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <qtsupport/qtkitinformation.h>
@@ -76,6 +79,25 @@ DebuggerStartParameters createStartParameters(const QnxRunConfiguration *runConf
params.displayName = runConfig->displayName();
params.remoteSetupNeeded = true;
params.closeMode = DetachAtClose;
+ params.processArgs = runConfig->arguments();
+
+ Debugger::DebuggerRunConfigurationAspect *aspect
+ = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
+ if (aspect->useQmlDebugger()) {
+ params.languages |= QmlLanguage;
+ params.qmlServerAddress = device->sshParameters().host;
+ params.qmlServerPort = 0; // QML port is handed out later
+ }
+
+ if (aspect->useCppDebugger())
+ params.languages |= Debugger::CppLanguage;
+
+ if (const ProjectExplorer::Project *project = runConfig->target()->project()) {
+ params.projectSourceDirectory = project->projectDirectory();
+ if (const ProjectExplorer::BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
+ params.projectBuildDirectory = buildConfig->buildDirectory();
+ params.projectSourceFiles = project->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
+ }
QnxQtVersion *qtVersion =
dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));