diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2014-01-14 10:28:16 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2014-01-14 15:58:34 +0100 |
commit | fbd9a3509ef8537a4dbe01f7d43ec2dd34fdb60b (patch) | |
tree | e2672833e7bd8667518fefde8df04c5feec3488d /src/plugins/qtsupport/qtparser.cpp | |
parent | e6b8f046e43941f332885f20b87b7ca2310a932a (diff) |
Fix icons in tasks
Create Tasks in such a way that they have the correct TaskType from
the start. This makes sure the icon chosen by default is the correct
one for that type and avoids the need to override the icon again later.
Change-Id: Ic47f1d119a7d8f85fcb6f2ee9aaaeadf074f8348
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/qtsupport/qtparser.cpp')
-rw-r--r-- | src/plugins/qtsupport/qtparser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qtsupport/qtparser.cpp b/src/plugins/qtsupport/qtparser.cpp index 5a0820bf350..89a237b2a16 100644 --- a/src/plugins/qtsupport/qtparser.cpp +++ b/src/plugins/qtsupport/qtparser.cpp @@ -55,13 +55,13 @@ void QtParser::stdError(const QString &line) int lineno = m_mocRegExp.cap(3).toInt(&ok); if (!ok) lineno = -1; - Task task(Task::Error, - m_mocRegExp.cap(5).trimmed(), + Task::TaskType type = Task::Error; + if (m_mocRegExp.cap(4).compare(QLatin1String("Warning"), Qt::CaseInsensitive) == 0) + type = Task::Warning; + Task task(type, m_mocRegExp.cap(5).trimmed() /* description */, Utils::FileName::fromUserInput(m_mocRegExp.cap(1)) /* filename */, lineno, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE); - if (m_mocRegExp.cap(4).compare(QLatin1String("Warning"), Qt::CaseInsensitive) == 0) - task.type = Task::Warning; emit addTask(task); return; } |