aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/gccparser.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@digia.com>2013-04-02 15:21:59 +0200
committerTobias Hunger <tobias.hunger@digia.com>2013-04-03 14:07:51 +0200
commitc320f65d1cd58f86061c09cf5992603e26af5871 (patch)
treeaa976df4d5b8e1e60a50a25c4abb2801582360c3 /src/plugins/projectexplorer/gccparser.cpp
parent85cf6b0e55e85b394fd436fa831d956dac1af585 (diff)
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>
Diffstat (limited to 'src/plugins/projectexplorer/gccparser.cpp')
-rw-r--r--src/plugins/projectexplorer/gccparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp
index ca88c95410..cf0350cced 100644
--- a/src/plugins/projectexplorer/gccparser.cpp
+++ b/src/plugins/projectexplorer/gccparser.cpp
@@ -62,7 +62,7 @@ GccParser::GccParser()
void GccParser::stdError(const QString &line)
{
- QString lne = line.trimmed();
+ QString lne = rightTrimmed(line);
// Blacklist some lines to not handle them:
if (lne.startsWith(QLatin1String("TeamBuilder ")) ||
@@ -117,7 +117,7 @@ void GccParser::stdError(const QString &line)
return;
} else if (m_regExpIncluded.indexIn(lne) > -1) {
emit addTask(Task(Task::Unknown,
- lne /* description */,
+ lne.trimmed() /* description */,
Utils::FileName::fromUserInput(m_regExpIncluded.cap(1)) /* filename */,
m_regExpIncluded.cap(3).toInt() /* linenumber */,
Core::Id(Constants::TASK_CATEGORY_COMPILE)));