forked from qt-creator/qt-creator
IOutputParser: Replace std{Out,Err} with a single parameterized function
Another step towards parser/formatter unification. Task-number: QTCREATORBUG-22665 Change-Id: I6de86b3aee2c54585cdd4b06d21b0ea67300aeac Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -36,18 +36,6 @@ JavaParser::JavaParser() :
|
||||
m_javaRegExp(QLatin1String("^(.*\\[javac\\]\\s)(.*\\.java):(\\d+):(.*)$"))
|
||||
{ }
|
||||
|
||||
void JavaParser::stdOutput(const QString &line)
|
||||
{
|
||||
parse(line);
|
||||
IOutputParser::stdOutput(line);
|
||||
}
|
||||
|
||||
void JavaParser::stdError(const QString &line)
|
||||
{
|
||||
parse(line);
|
||||
IOutputParser::stdError(line);
|
||||
}
|
||||
|
||||
void JavaParser::setProjectFileList(const QStringList &fileList)
|
||||
{
|
||||
m_fileList = fileList;
|
||||
@@ -63,6 +51,12 @@ void JavaParser::setSourceDirectory(const Utils::FilePath &sourceDirectory)
|
||||
m_sourceDirectory = sourceDirectory;
|
||||
}
|
||||
|
||||
void JavaParser::handleLine(const QString &line, Utils::OutputFormat type)
|
||||
{
|
||||
parse(line);
|
||||
IOutputParser::handleLine(line, type);
|
||||
}
|
||||
|
||||
void JavaParser::parse(const QString &line)
|
||||
{
|
||||
if (m_javaRegExp.indexIn(line) > -1) {
|
||||
|
||||
@@ -39,14 +39,13 @@ class JavaParser : public ProjectExplorer::IOutputParser
|
||||
|
||||
public:
|
||||
JavaParser();
|
||||
void stdOutput(const QString &line) override;
|
||||
void stdError(const QString &line) override;
|
||||
void setProjectFileList(const QStringList &fileList);
|
||||
|
||||
void setBuildDirectory(const Utils::FilePath &buildDirectory);
|
||||
void setSourceDirectory(const Utils::FilePath &sourceDirectory);
|
||||
|
||||
private:
|
||||
void handleLine(const QString &line, Utils::OutputFormat type) override;
|
||||
void parse(const QString &line);
|
||||
|
||||
QRegExp m_javaRegExp;
|
||||
|
||||
Reference in New Issue
Block a user