diff options
author | hjk <hjk@theqtcompany.com> | 2016-01-27 16:02:28 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-01-28 08:08:19 +0000 |
commit | 07332eecb387549303cce888a483570e0528d0f8 (patch) | |
tree | f1a967ccc2319dba036628685fe920bcc5fdc677 /src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp | |
parent | 5a090230a1ce78deb752c99111c320dc07a00153 (diff) |
QmlProfiler: Use StandardRunnable in LocalQmlProfilerRunner
Change-Id: I8c59f9dfe562717edd86453b0154b7f2811a06f3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp index 65c20ba11ab..885e0f4d898 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp @@ -75,6 +75,12 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat QTC_ASSERT(runConfiguration->runnable().is<StandardRunnable>(), return 0); auto runnable = runConfiguration->runnable().as<StandardRunnable>(); + if (runnable.executable.isEmpty()) { + if (errorMessage) + *errorMessage = tr("No executable file to launch."); + return 0; + } + Kit *kit = runConfiguration->target()->kit(); AnalyzerConnection connection; const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit); @@ -101,20 +107,10 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat runControl->setConnection(connection); LocalQmlProfilerRunner::Configuration conf; - conf.executable = runnable.executable; - conf.executableArguments = runnable.commandLineArguments; - conf.workingDirectory = runnable.workingDirectory; + conf.debuggee = runnable; conf.socket = connection.analyzerSocket; - if (EnvironmentAspect *environment = runConfiguration->extraAspect<EnvironmentAspect>()) - conf.environment = environment->environment(); conf.port = connection.analyzerPort; - if (conf.executable.isEmpty()) { - if (errorMessage) - *errorMessage = tr("No executable file to launch."); - return 0; - } - (void) new LocalQmlProfilerRunner(conf, runControl); return runControl; } |