aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/valgrind
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-03-13 15:34:44 +0100
committerhjk <hjk@qt.io>2019-03-20 09:16:08 +0000
commit68a10d71e75b9184eb731afb5000fa01809bab37 (patch)
tree03817136fcfdf8ed07a9815a69efb4a0ab73b0ae /src/plugins/valgrind
parent358bb49f62052693bad159a1864755cd7947d30a (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.cpp3
-rw-r--r--src/plugins/valgrind/memchecktool.cpp3
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);