forked from qt-creator/qt-creator
IOutputParser: Cleanup and fix
Change-Id: I6ab47e44056c9af7def4e5eb301b1e64f6766c32 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -123,10 +123,6 @@
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
IOutputParser::IOutputParser() : m_parser(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
IOutputParser::~IOutputParser()
|
IOutputParser::~IOutputParser()
|
||||||
{
|
{
|
||||||
delete m_parser;
|
delete m_parser;
|
||||||
@@ -142,19 +138,15 @@ void IOutputParser::appendOutputParser(IOutputParser *parser)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_parser = parser;
|
m_parser = parser;
|
||||||
connect(parser, SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat)),
|
connect(parser, &IOutputParser::addOutput, this, &IOutputParser::outputAdded, Qt::DirectConnection);
|
||||||
this, SLOT(outputAdded(QString,ProjectExplorer::BuildStep::OutputFormat)), Qt::DirectConnection);
|
connect(parser, &IOutputParser::addTask, this, &IOutputParser::taskAdded, Qt::DirectConnection);
|
||||||
connect(parser, SIGNAL(addTask(ProjectExplorer::Task, int, int)),
|
|
||||||
this, SLOT(taskAdded(ProjectExplorer::Task, int, int)), Qt::DirectConnection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IOutputParser *IOutputParser::takeOutputParserChain()
|
IOutputParser *IOutputParser::takeOutputParserChain()
|
||||||
{
|
{
|
||||||
IOutputParser *parser = m_parser;
|
IOutputParser *parser = m_parser;
|
||||||
disconnect(parser, SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat)),
|
disconnect(parser, &IOutputParser::addOutput, this, &IOutputParser::outputAdded);
|
||||||
this, SLOT(outputAdded(QString,ProjectExplorer::BuildStep::OutputFormat)));
|
disconnect(parser, &IOutputParser::addTask, this, &IOutputParser::taskAdded);
|
||||||
disconnect(parser, SIGNAL(addTask(ProjectExplorer::Task, int, int)),
|
|
||||||
this, SLOT(taskAdded(ProjectExplorer::Task, int, int)));
|
|
||||||
m_parser = 0;
|
m_parser = 0;
|
||||||
return parser;
|
return parser;
|
||||||
}
|
}
|
||||||
@@ -169,6 +161,8 @@ 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, this, &IOutputParser::outputAdded, Qt::DirectConnection);
|
||||||
|
connect(parser, &IOutputParser::addTask, this, &IOutputParser::taskAdded, Qt::DirectConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IOutputParser::stdOutput(const QString &line)
|
void IOutputParser::stdOutput(const QString &line)
|
||||||
|
@@ -39,7 +39,7 @@ class PROJECTEXPLORER_EXPORT IOutputParser : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
IOutputParser();
|
IOutputParser() = default;
|
||||||
~IOutputParser();
|
~IOutputParser();
|
||||||
|
|
||||||
virtual void appendOutputParser(IOutputParser *parser);
|
virtual void appendOutputParser(IOutputParser *parser);
|
||||||
@@ -71,7 +71,7 @@ public slots:
|
|||||||
private:
|
private:
|
||||||
virtual void doFlush();
|
virtual void doFlush();
|
||||||
|
|
||||||
IOutputParser *m_parser;
|
IOutputParser *m_parser = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
Reference in New Issue
Block a user