Commit 9be9fcc7 authored by Friedemann Kleint's avatar Friedemann Kleint Committed by Tobias Hunger

IOutputParser::setChildParser(): Do not connect to 0.

Fixes warnings:
WARN  : ProjectExplorer::ProjectExplorerPlugin::testMsvcOutputParsers(Multiline error) QObject::connect: invalid null parameter

when running:
qtcreator -test ProjectExplorer,testMsvcOutputParsers

Change-Id: I07285b43873d76d67fcb0a67a9955d95ec1ac267
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent da05ddc3
...@@ -163,10 +163,12 @@ void IOutputParser::setChildParser(IOutputParser *parser) ...@@ -163,10 +163,12 @@ void IOutputParser::setChildParser(IOutputParser *parser)
if (m_parser != parser) if (m_parser != parser)
delete m_parser; delete m_parser;
m_parser = parser; m_parser = parser;
connect(parser, &IOutputParser::addOutput, if (parser) {
this, &IOutputParser::outputAdded, Qt::DirectConnection); connect(parser, &IOutputParser::addOutput,
connect(parser, &IOutputParser::addTask, this, &IOutputParser::outputAdded, Qt::DirectConnection);
this, &IOutputParser::taskAdded, Qt::DirectConnection); connect(parser, &IOutputParser::addTask,
this, &IOutputParser::taskAdded, Qt::DirectConnection);
}
} }
void IOutputParser::stdOutput(const QString &line) void IOutputParser::stdOutput(const QString &line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment