diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2013-05-03 16:08:00 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-05-06 10:04:38 +0200 |
commit | 8bbad43019af98e342d6a5b311016fa20198e4cf (patch) | |
tree | 0727f9ffd34dd0d6dfd221558e2aa69b295f4742 /src/plugins/projectexplorer/clangparser.cpp | |
parent | 14763118a58bf526f873b6750c3785f8752e4d7e (diff) | |
download | qt-creator-8bbad43019af98e342d6a5b311016fa20198e4cf.tar.gz |
OutputParser: Allow to flush pending tasks.
Add a way to flush out tasks from the outputparsers. This is necessary
to make parsers that keep state more robust.
Flush parsers (once) before adding any new task. This keeps the sequence
intact.
Flush all parsers once the parsing is done to make sure there is no task
queued somewhere.
Task-number: QTCREATORBUG-9195
Change-Id: Icd37df1f470cb73123ad286d6900ad1047a1d512
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/projectexplorer/clangparser.cpp')
-rw-r--r-- | src/plugins/projectexplorer/clangparser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/projectexplorer/clangparser.cpp b/src/plugins/projectexplorer/clangparser.cpp index 0832d283d9..cc55157358 100644 --- a/src/plugins/projectexplorer/clangparser.cpp +++ b/src/plugins/projectexplorer/clangparser.cpp @@ -52,7 +52,7 @@ void ClangParser::stdError(const QString &line) { const QString lne = rightTrimmed(line); if (m_summaryRegExp.indexIn(lne) > -1) { - emitTask(); + doFlush(); m_expectSnippet = false; return; } @@ -74,11 +74,11 @@ void ClangParser::stdError(const QString &line) if (m_inLineRegExp.indexIn(lne) > -1) { m_expectSnippet = true; - newTask(Task::Unknown, - lne.trimmed(), - Utils::FileName::fromUserInput(m_inLineRegExp.cap(2)), /* filename */ - m_inLineRegExp.cap(3).toInt(), /* line */ - Core::Id(Constants::TASK_CATEGORY_COMPILE)); + newTask(Task(Task::Unknown, + lne.trimmed(), + Utils::FileName::fromUserInput(m_inLineRegExp.cap(2)), /* filename */ + m_inLineRegExp.cap(3).toInt(), /* line */ + Core::Id(Constants::TASK_CATEGORY_COMPILE))); return; } |