forked from qt-creator/qt-creator
QmlProfiler: Drop static accessors from QmlProfilerTool
It wasn't really a singleton even before. For testing purposes make the client/state/model managers accessible. Change-Id: Ie5efbc47a6b9119495f999e4e05877d4789da407 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -106,10 +106,17 @@ void QmlProfilerPlugin::extensionsInitialized()
|
||||
};
|
||||
|
||||
RunControl::registerWorkerCreator(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE,
|
||||
[](RunControl *runControl) { return new QmlProfilerRunner(runControl); });
|
||||
[this](RunControl *runControl) {
|
||||
QmlProfilerRunner *runner = new QmlProfilerRunner(runControl);
|
||||
connect(runner, &QmlProfilerRunner::starting,
|
||||
m_profilerTool, &QmlProfilerTool::finalizeRunControl);
|
||||
return runner;
|
||||
});
|
||||
|
||||
RunControl::registerWorker<LocalQmlProfilerSupport>
|
||||
(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE, constraint);
|
||||
RunControl::registerWorker(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE,
|
||||
[this](ProjectExplorer::RunControl *runControl) {
|
||||
return new LocalQmlProfilerSupport(m_profilerTool, runControl);
|
||||
}, constraint);
|
||||
}
|
||||
|
||||
ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()
|
||||
|
||||
Reference in New Issue
Block a user