diff options
author | hjk <hjk@qt.io> | 2019-03-12 15:53:54 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-03-12 16:38:45 +0000 |
commit | efb7d8deb77523cc0294d01d67e277e4ce471d33 (patch) | |
tree | 6bf9415373ed0e6f7daa9e54d26e7089067e49fe /src/plugins/qmlprofiler | |
parent | d6dfa7fa77241078098b8ce0b5dad1c1b86ed1d7 (diff) |
ProjectExplorer: Split RunControl constructor
Into a trivial bit and two setters. Plan is to use it only with information
that is truly there (e.g. kit/device only) at the user side without having
to invent a RunConfiguration "handle".
Also remove some dead code in the test runner.
Change-Id: I987881e41722178b14b91f973b84cbdb67a9f85e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 3f01a55d9c4..1df46d885b7 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -552,8 +552,8 @@ ProjectExplorer::RunControl *QmlProfilerTool::attachToWaitingApplication() d->m_viewContainer->perspective()->select(); - auto runConfig = RunConfiguration::startupRunConfiguration(); - auto runControl = new RunControl(runConfig, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + auto runControl = new RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + runControl->setRunConfiguration(RunConfiguration::startupRunConfiguration()); auto profiler = new QmlProfilerRunner(runControl); profiler->setServerUrl(serverUrl); connect(profiler, &QmlProfilerRunner::starting, this, &QmlProfilerTool::finalizeRunControl); diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp index a4721bf4500..e96f4da649e 100644 --- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp +++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp @@ -64,8 +64,7 @@ void LocalQmlProfilerRunnerTest::testRunner() serverUrl.setScheme(Utils::urlSocketScheme()); serverUrl.setPath("invalid"); - runControl = new ProjectExplorer::RunControl(nullptr, - ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + runControl = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); runControl->setRunnable(debuggee); profiler = new LocalQmlProfilerSupport(&tool, runControl, serverUrl); @@ -115,8 +114,7 @@ void LocalQmlProfilerRunnerTest::testRunner() // comma is used to specify a test function. In this case, an invalid one. debuggee.commandLineArguments = QString("-test QmlProfiler,"); - runControl = new ProjectExplorer::RunControl(nullptr, - ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + runControl = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); runControl->setRunnable(debuggee); profiler = new LocalQmlProfilerSupport(&tool, runControl, serverUrl); connectRunner(); @@ -135,8 +133,7 @@ void LocalQmlProfilerRunnerTest::testRunner() debuggee.commandLineArguments.clear(); serverUrl.clear(); serverUrl = Utils::urlFromLocalHostAndFreePort(); - runControl = new ProjectExplorer::RunControl(nullptr, - ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + runControl = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); runControl->setRunnable(debuggee); profiler = new LocalQmlProfilerSupport(&tool, runControl, serverUrl); connectRunner(); @@ -161,8 +158,7 @@ void LocalQmlProfilerRunnerTest::testRunner() serverUrl.setPath(file.fileName()); } - runControl = new ProjectExplorer::RunControl(nullptr, - ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + runControl = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); runControl->setRunnable(debuggee); profiler = new LocalQmlProfilerSupport(&tool, runControl, serverUrl); connectRunner(); |