forked from qt-creator/qt-creator
ProjectExplorer: Replace RunControl::producer
... by two more specialized canRun() / createMainWorker() functions resulting in somewhat leaner code on the user side and paving the way for introducing a RunWorkerFactory class intended to follow the now-canonical way of having factories as members in the plugin pimpl. Change-Id: Id6fc2043a340203f14ab0b896a8dfa1e298f58a6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -282,8 +282,7 @@ CallgrindTool::CallgrindTool()
|
||||
m_perspective.select();
|
||||
auto runControl = new RunControl(CALLGRIND_RUN_MODE);
|
||||
runControl->setRunConfiguration(runConfig);
|
||||
if (auto creator = RunControl::producer(runConfig, CALLGRIND_RUN_MODE))
|
||||
creator(runControl);
|
||||
runControl->createMainWorker();
|
||||
const auto runnable = dlg.runnable();
|
||||
runControl->setRunnable(runnable);
|
||||
runControl->setDisplayName(runnable.executable);
|
||||
|
||||
Reference in New Issue
Block a user