Valgrind: Merge MemCheck{,WithGdb}ToolRunner

Change-Id: Iaf0707cf5c06ef29c33da835133948256869c76a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-06-21 07:54:54 +02:00
parent 533f92c1bd
commit acc9da0861
3 changed files with 36 additions and 54 deletions

View File

@@ -563,11 +563,7 @@ RunWorker *MemcheckTool::createRunWorker(RunControl *runControl)
m_errorModel.setRelevantFrameFinder(makeFrameFinder(runConfig
? runConfig->target()->project()->files(Project::AllFiles) : QStringList()));
MemcheckToolRunner *runTool = 0;
if (runControl->runMode() == MEMCHECK_RUN_MODE)
runTool = new MemcheckToolRunner(runControl);
else
runTool = new MemcheckWithGdbToolRunner(runControl);
auto runTool = new MemcheckToolRunner(runControl, runControl->runMode() == MEMCHECK_WITH_GDB_RUN_MODE);
connect(runTool, &MemcheckToolRunner::starting,
this, [this, runTool] { engineStarting(runTool); });