Valgrind: Merge MemCheckRunner and ValgrindRunner base

It's mostly the xml/log handling, which can be re-used in other tools.

The change is purely mechanical, including some style fixes and
some modernization.

Change-Id: I6b44ae71451e8d3e26df40b9af9b4ec70038a92d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-06-21 08:08:43 +02:00
parent 1acd9d30dc
commit 88fd4043d8
16 changed files with 158 additions and 331 deletions

View File

@@ -31,7 +31,7 @@
#include "xmlprotocol/suppression.h"
#include "xmlprotocol/threadedparser.h"
#include "xmlprotocol/parser.h"
#include "memcheck/memcheckrunner.h"
#include "valgrindrunner.h"
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/projectexplorer.h>
@@ -45,7 +45,6 @@
#define HEADER_LENGTH 25
using namespace Valgrind::XmlProtocol;
using namespace Valgrind::Memcheck;
namespace Valgrind {
namespace Test {
@@ -131,10 +130,10 @@ void ValgrindTestRunnerTest::init()
Q_ASSERT(m_logMessages.isEmpty());
Q_ASSERT(!m_runner);
m_runner = new MemcheckRunner;
m_runner->setValgrindExecutable(QLatin1String("valgrind"));
m_runner = new ValgrindRunner;
m_runner->setValgrindExecutable("valgrind");
m_runner->setProcessChannelMode(QProcess::ForwardedChannels);
connect(m_runner, &MemcheckRunner::logMessageReceived,
connect(m_runner, &ValgrindRunner::logMessageReceived,
this, &ValgrindTestRunnerTest::logMessageReceived);
connect(m_runner, &ValgrindRunner::processErrorReceived,
this, &ValgrindTestRunnerTest::internalError);