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:
@@ -673,8 +673,7 @@ MemcheckTool::MemcheckTool()
|
||||
m_perspective.select();
|
||||
RunControl *rc = new RunControl(MEMCHECK_RUN_MODE);
|
||||
rc->setRunConfiguration(runConfig);
|
||||
if (auto creator = RunControl::producer(runConfig, MEMCHECK_RUN_MODE))
|
||||
creator(rc);
|
||||
rc->createMainWorker();
|
||||
const auto runnable = dlg.runnable();
|
||||
rc->setRunnable(runnable);
|
||||
rc->setDisplayName(runnable.executable);
|
||||
|
||||
Reference in New Issue
Block a user