diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index 9242ee538bfaa93fe9e59fd5a95dbb13d95ada23..0aaa844623c32e4858a5431f0d1a034ce1e506e2 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeparser.cpp @@ -29,6 +29,8 @@ #include "cmakeparser.h" +#include <utils/qtcassert.h> + #include <projectexplorer/gnumakeparser.h> #include <projectexplorer/projectexplorerconstants.h> @@ -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 1cd2b725c4d3caa97f75662248795126f334027c..613707e656ed2d10810046503701cb9839072a35 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -32,6 +32,8 @@ #include "task.h" #include "projectexplorerconstants.h" +#include <utils/qtcassert.h> + 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 e478255382a534fea96ae2b6694df57bbe06c7e4..a1d19cc64f2a7bd5355985e246489fd4455f813c 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -32,6 +32,8 @@ #include "projectexplorerconstants.h" #include "task.h" +#include <utils/qtcassert.h> + #include <QDir> #include <QFile> @@ -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 a555171524e749c65161a9853db03c8d9bcb8c13..55f21eec076ed17bddaca752d84c09e736663cdc 100644 --- a/src/plugins/projectexplorer/ldparser.cpp +++ b/src/plugins/projectexplorer/ldparser.cpp @@ -31,6 +31,8 @@ #include "projectexplorerconstants.h" #include "task.h" +#include <utils/qtcassert.h> + 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 bdd6f3ac1f61df29d5517787e0ac04a63450f69e..901c3afe232879f6a158635d84f0c85af4419190 100644 --- a/src/plugins/projectexplorer/linuxiccparser.cpp +++ b/src/plugins/projectexplorer/linuxiccparser.cpp @@ -31,6 +31,8 @@ #include "ldparser.h" #include "projectexplorerconstants.h" +#include <utils/qtcassert.h> + 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 b3fa47cfd3c0a2466e3daa8af3e37c46cf8652fd..56c4e4bc6973598eab8b788c65678b070bdaec03 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -30,6 +30,7 @@ #include "msvcparser.h" #include "projectexplorerconstants.h" +#include <utils/qtcassert.h> #ifdef Q_OS_WIN #include <utils/winutils.h> #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)