Valgrind: Make the (threaded) parser a proper member of the runner

Simplifies user code, and it was only ever used in a 1:1 relation,
even in the tests.

Change-Id: I3ce4fc83a361aceb730c05420efdb4ea52d37cda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-06-21 09:01:48 +02:00
parent 7edd5876a5
commit fc8dee4675
9 changed files with 25 additions and 60 deletions

View File

@@ -112,9 +112,6 @@ void ValgrindTestRunnerTest::cleanup()
Q_ASSERT(m_runner);
delete m_runner;
m_runner = 0;
Q_ASSERT(m_parser);
delete m_parser;
m_parser = 0;
m_logMessages.clear();
m_errors.clear();
@@ -137,14 +134,10 @@ void ValgrindTestRunnerTest::init()
this, &ValgrindTestRunnerTest::logMessageReceived);
connect(m_runner, &ValgrindRunner::processErrorReceived,
this, &ValgrindTestRunnerTest::internalError);
Q_ASSERT(!m_parser);
m_parser = new ThreadedParser;
connect(m_parser, &ThreadedParser::internalError,
connect(m_runner->parser(), &ThreadedParser::internalError,
this, &ValgrindTestRunnerTest::internalError);
connect(m_parser, &ThreadedParser::error,
connect(m_runner->parser(), &ThreadedParser::error,
this, &ValgrindTestRunnerTest::error);
m_runner->setParser(m_parser);
}
//BEGIN: Actual test cases
@@ -735,7 +728,6 @@ void ValgrindTestRunnerTest::testInvalidjump()
}
}
void ValgrindTestRunnerTest::testOverlap()
{
const QString app("overlap");