diff options
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeparser.h')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeparser.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.h b/src/plugins/cmakeprojectmanager/cmakeparser.h index 57b41ce559..dc6f8e708e 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.h +++ b/src/plugins/cmakeprojectmanager/cmakeparser.h @@ -30,33 +30,33 @@ #include <projectexplorer/ioutputparser.h> #include <projectexplorer/task.h> +#include <utils/optional.h> + #include <QDir> -#include <QRegExp> #include <QRegularExpression> namespace CMakeProjectManager { -class CMAKE_EXPORT CMakeParser : public ProjectExplorer::IOutputParser +class CMAKE_EXPORT CMakeParser : public ProjectExplorer::OutputTaskParser { Q_OBJECT public: explicit CMakeParser(); void setSourceDirectory(const QString &sourceDir); - void stdError(const QString &line) override; - -protected: - void doFlush() override; private: + Result handleLine(const QString &line, Utils::OutputFormat type) override; + void flush() override; + enum TripleLineError { NONE, LINE_LOCATION, LINE_DESCRIPTION, LINE_DESCRIPTION2 }; TripleLineError m_expectTripleLineErrorData = NONE; Utils::optional<QDir> m_sourceDirectory; ProjectExplorer::Task m_lastTask; - QRegExp m_commonError; - QRegExp m_nextSubError; + QRegularExpression m_commonError; + QRegularExpression m_nextSubError; QRegularExpression m_locationLine; bool m_skippedFirstEmptyLine = false; int m_lines = 0; |