diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index 9242ee538bf..0aaa844623c 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeparser.cpp @@ -29,6 +29,8 @@ #include "cmakeparser.h" +#include + #include #include @@ -46,9 +48,11 @@ CMakeParser::CMakeParser() : { m_commonError.setPattern(QLatin1String(COMMON_ERROR_PATTERN)); m_commonError.setMinimal(true); + QTC_CHECK(m_commonError.isValid()); m_nextSubError.setPattern(QLatin1String(NEXT_SUBERROR_PATTERN)); m_nextSubError.setMinimal(true); + QTC_CHECK(m_nextSubError.isValid()); appendOutputParser(new GnuMakeParser()); } diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 1cd2b725c4d..613707e656e 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -32,6 +32,8 @@ #include "task.h" #include "projectexplorerconstants.h" +#include + using namespace ProjectExplorer; // opt. drive letter + filename: (2 brackets) @@ -44,10 +46,12 @@ GccParser::GccParser() m_regExp.setPattern(QLatin1Char('^') + QLatin1String(FILE_PATTERN) + QLatin1String("(\\d+):(\\d+:)?\\s+((fatal |#)?(warning|error|note):?\\s)?([^\\s].+)$")); m_regExp.setMinimal(true); + QTC_CHECK(m_regExp.isValid()); m_regExpIncluded.setPattern(QString::fromLatin1("\\bfrom\\s") + QLatin1String(FILE_PATTERN) + QLatin1String("(\\d+)(:\\d+)?[,:]?$")); m_regExpIncluded.setMinimal(true); + QTC_CHECK(m_regExpIncluded.isValid()); // optional path with trailing slash // optional arm-linux-none-thingy @@ -56,6 +60,7 @@ GccParser::GccParser() // optional .exe postfix m_regExpGccNames.setPattern(QLatin1String(COMMAND_PATTERN)); m_regExpGccNames.setMinimal(true); + QTC_CHECK(m_regExpGccNames.isValid()); appendOutputParser(new LdParser); } diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp index e478255382a..a1d19cc64f2 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -32,6 +32,8 @@ #include "projectexplorerconstants.h" #include "task.h" +#include + #include #include @@ -50,10 +52,13 @@ GnuMakeParser::GnuMakeParser() : m_makeDir.setPattern(QLatin1String(MAKE_PATTERN) + QLatin1String("(\\w+) directory .(.+).$")); m_makeDir.setMinimal(true); + QTC_CHECK(m_makeDir.isValid()); m_makeLine.setPattern(QLatin1String(MAKE_PATTERN) + QLatin1String("(\\*\\*\\*\\s)?(.*)$")); m_makeLine.setMinimal(true); + QTC_CHECK(m_makeLine.isValid()); m_makefileError.setPattern(QLatin1String("^(.*):(\\d+):\\s\\*\\*\\*\\s(.*)$")); m_makefileError.setMinimal(true); + QTC_CHECK(m_makefileError.isValid()); } void GnuMakeParser::setWorkingDirectory(const QString &workingDirectory) diff --git a/src/plugins/projectexplorer/ldparser.cpp b/src/plugins/projectexplorer/ldparser.cpp index a555171524e..55f21eec076 100644 --- a/src/plugins/projectexplorer/ldparser.cpp +++ b/src/plugins/projectexplorer/ldparser.cpp @@ -31,6 +31,8 @@ #include "projectexplorerconstants.h" #include "task.h" +#include + using namespace ProjectExplorer; namespace { @@ -50,9 +52,11 @@ LdParser::LdParser() QString::fromLatin1(FILE_PATTERN) + QLatin1String(")?(") + QLatin1String(POSITION_PATTERN) + QLatin1String(")?\\s(.+)$")); m_regExpLinker.setMinimal(true); + QTC_CHECK(m_regExpLinker.isValid()); m_regExpGccNames.setPattern(QLatin1String(COMMAND_PATTERN)); m_regExpGccNames.setMinimal(true); + QTC_CHECK(m_regExpGccNames.isValid()); } void LdParser::stdError(const QString &line) diff --git a/src/plugins/projectexplorer/linuxiccparser.cpp b/src/plugins/projectexplorer/linuxiccparser.cpp index bdd6f3ac1f6..901c3afe232 100644 --- a/src/plugins/projectexplorer/linuxiccparser.cpp +++ b/src/plugins/projectexplorer/linuxiccparser.cpp @@ -31,6 +31,8 @@ #include "ldparser.h" #include "projectexplorerconstants.h" +#include + using namespace ProjectExplorer; LinuxIccParser::LinuxIccParser() @@ -44,16 +46,19 @@ LinuxIccParser::LinuxIccParser() " ((error|warning)( #\\d+)?: )?" // optional type (cap 4) and optional error number // TODO really optional ? "(.*)$")); // description (cap 6) //m_firstLine.setMinimal(true); + QTC_CHECK(m_firstLine.isValid()); // Note pattern also matches caret lines m_continuationLines.setPattern(QLatin1String("^\\s+" // At least one whitespace "(.*)$"));// description m_continuationLines.setMinimal(true); + QTC_CHECK(m_continuationLines.isValid()); m_caretLine.setPattern(QLatin1String("^\\s*" // Whitespaces "\\^" // a caret "\\s*$")); // and again whitespaces m_caretLine.setMinimal(true); + QTC_CHECK(m_caretLine.isValid()); appendOutputParser(new LdParser); } diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp index b3fa47cfd3c..56c4e4bc697 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -30,6 +30,7 @@ #include "msvcparser.h" #include "projectexplorerconstants.h" +#include #ifdef Q_OS_WIN #include #endif @@ -74,8 +75,10 @@ MsvcParser::MsvcParser() + QLatin1String("(Command line |fatal )?(warning|error) (") + QLatin1String(ERROR_PATTERN) + QLatin1String(".*)$")); m_compileRegExp.setMinimal(true); + QTC_CHECK(m_compileRegExp.isValid()); m_additionalInfoRegExp.setPattern(QString::fromLatin1("^ (.*)\\((\\d+)\\) : (.*)$")); m_additionalInfoRegExp.setMinimal(true); + QTC_CHECK(m_additionalInfoRegExp.isValid()); } void MsvcParser::stdOutput(const QString &line)