aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/task.cpp')
-rw-r--r--src/plugins/projectexplorer/task.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp
index 045e461d43..3ca1b969da 100644
--- a/src/plugins/projectexplorer/task.cpp
+++ b/src/plugins/projectexplorer/task.cpp
@@ -67,7 +67,7 @@ Task::Task(TaskType type_, const QString &description,
const QIcon &icon, Options options) :
taskId(s_nextId), type(type_), options(options), summary(description),
line(line_), movedLine(line_), category(category_),
- icon(icon.isNull() ? taskTypeIcon(type_) : icon)
+ m_icon(icon)
{
++s_nextId;
setFile(file_);
@@ -108,7 +108,7 @@ void Task::clear()
line = -1;
movedLine = -1;
category = Utils::Id();
- icon = QIcon();
+ m_icon = QIcon();
formats.clear();
m_mark.clear();
}
@@ -133,6 +133,13 @@ QString Task::description() const
return desc;
}
+QIcon Task::icon() const
+{
+ if (m_icon.isNull())
+ m_icon = taskTypeIcon(type);
+ return m_icon;
+}
+
//
// functions
//