diff options
author | hjk <hjk@qt.io> | 2019-03-13 15:34:44 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-03-20 09:16:08 +0000 |
commit | 68a10d71e75b9184eb731afb5000fa01809bab37 (patch) | |
tree | 03817136fcfdf8ed07a9815a69efb4a0ab73b0ae /src/plugins/valgrind | |
parent | 358bb49f62052693bad159a1864755cd7947d30a (diff) |
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>
Diffstat (limited to 'src/plugins/valgrind')
-rw-r--r-- | src/plugins/valgrind/callgrindtool.cpp | 3 | ||||
-rw-r--r-- | src/plugins/valgrind/memchecktool.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index 92c664eaa3..decc989781 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -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); diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index ac500217d4..221d297277 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -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); |