aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-01-06 11:40:52 +0100
committerhjk <hjk@theqtcompany.com>2016-01-07 18:11:09 +0000
commit8150209ff7b9a4bb5bf8e580ac05c9dc2fe77854 (patch)
treeaddda607567ebff49c36e70ef431f3f512d8e47a /src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
parent312069209220083fcf83a749c8cfcb7db80dad8f (diff)
Analyzer: Slim down AnalyzerStartParameters
* SysRoot can always be determined from kit. * Pass around RunMode as extra parameter not as part of AnalyzerStartParameters. That's closer to the pattern used elsewhere. * Environment was always initialized from the runconfig's EnvironmentAspect. The tools can do that directly. * Provide setter for display name for cases where it is not equal to RunConfiguration::displayName Change-Id: I811a0d7cdeb55cc37a16a593b3942abb567a2150 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/localqmlprofilerrunner.cpp')
-rw-r--r--src/plugins/qmlprofiler/localqmlprofilerrunner.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
index 9d49420f27..56391a38d7 100644
--- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
+++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
@@ -60,7 +60,7 @@ Analyzer::AnalyzerRunControl *LocalQmlProfilerRunner::createLocalRunControl(
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return 0);
Analyzer::AnalyzerRunControl *rc = Analyzer::AnalyzerManager::createRunControl(
- sp, runConfiguration);
+ sp, runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
QmlProfilerRunControl *engine = qobject_cast<QmlProfilerRunControl *>(rc);
if (!engine) {
delete rc;
@@ -70,9 +70,10 @@ Analyzer::AnalyzerRunControl *LocalQmlProfilerRunner::createLocalRunControl(
Configuration conf;
conf.executable = sp.debuggee;
conf.executableArguments = sp.debuggeeArgs;
- conf.workingDirectory = sp.workingDirectory;
- conf.environment = sp.environment;
+ conf.workingDirectory = rc->workingDirectory();
conf.socket = sp.analyzerSocket;
+ if (EnvironmentAspect *environment = runConfiguration->extraAspect<EnvironmentAspect>())
+ conf.environment = environment->environment();
conf.port = sp.analyzerPort;
if (conf.executable.isEmpty()) {