forked from qt-creator/qt-creator
IOutputParser: Make sure to not cut too much output
Introduce a method to cut away whitespaces from the end of a string and use it consistently. This avoids a chain of parsers to repeatedly cut away the last character, assuming that will be the line-break. Task-number: QTCREATORBUG-9032 Change-Id: I68261c10873535faf94c885c914cd00510ed75d8 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -33,10 +33,8 @@
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace {
|
||||
// opt. drive letter + filename: (2 brackets)
|
||||
const char * const FILE_PATTERN = "(<command line>|([A-Za-z]:)?[^:]+\\.[^:]+)";
|
||||
}
|
||||
// opt. drive letter + filename: (2 brackets)
|
||||
static const char * const FILE_PATTERN = "(<command line>|([A-Za-z]:)?[^:]+\\.[^:]+)";
|
||||
|
||||
ClangParser::ClangParser() :
|
||||
m_commandRegExp(QLatin1String("^clang(\\+\\+)?: +(fatal +)?(warning|error|note): (.*)$")),
|
||||
@@ -57,7 +55,7 @@ ClangParser::~ClangParser()
|
||||
|
||||
void ClangParser::stdError(const QString &line)
|
||||
{
|
||||
const QString lne = line.left(line.count() - 1);
|
||||
const QString lne = rightTrimmed(line);
|
||||
if (m_summaryRegExp.indexIn(lne) > -1) {
|
||||
emitTask();
|
||||
m_expectSnippet = false;
|
||||
|
||||
Reference in New Issue
Block a user