diff options
author | hjk <[email protected]> | 2019-08-07 18:05:15 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2019-08-09 12:34:42 +0000 |
commit | f9c221eb54ca3174c57f736b7afd5914147ab2a2 (patch) | |
tree | 1d58370c31fd3c342ddd133f659ee01adb017b22 /src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | |
parent | a88970db34357adaaedd7514490d94702744a7ec (diff) |
ProjectExplorer: Re-work setup runworker factories
This combines two of the previous three paths to create run workers,
and refers to RunConfigurations by id, not by type where possible
to decrease coupling between the classes.
Only allow "type of run configuration" and "type of device"
as the only possible kind of restriction and require a uniform
RunWorker constructor signature.
Adapt user code to fit that pattern.
Change-Id: I5a6d49c9a144785fd0235d7586f244b56f67b366
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index c9cc305d750..4d56267ca42 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -218,14 +218,12 @@ static QUrl localServerUrl(RunControl *runControl) return serverUrl; } -LocalQmlProfilerSupport::LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, - RunControl *runControl) - : LocalQmlProfilerSupport(profilerTool, runControl, localServerUrl(runControl)) +LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl) + : LocalQmlProfilerSupport(runControl, localServerUrl(runControl)) { } -LocalQmlProfilerSupport::LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, - RunControl *runControl, const QUrl &serverUrl) +LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const QUrl &serverUrl) : SimpleTargetRunner(runControl) { setId("LocalQmlProfilerSupport"); @@ -233,7 +231,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(QmlProfilerTool *profilerTool, auto profiler = new QmlProfilerRunner(runControl); profiler->setServerUrl(serverUrl); connect(profiler, &QmlProfilerRunner::starting, - profilerTool, &QmlProfilerTool::finalizeRunControl); + QmlProfilerTool::instance(), &QmlProfilerTool::finalizeRunControl); addStopDependency(profiler); // We need to open the local server before the application tries to connect. |