diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-09-04 18:08:45 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-09-07 07:33:45 +0000 |
commit | 9c99aa223db8c9ae09c20387a82b23c03eee0e73 (patch) | |
tree | 6ab48e062583c9d69198a8efc35613f529cb7a5e /src/plugins/projectexplorer/taskmodel.cpp | |
parent | 568cd8066e7b0e92ffaddc3109bd9677dbdde979 (diff) |
ProjectExplorer: Delay task icon creation
Parsers can change the initial task type when accumulating output, and
then the original icon would no longer match.
To the user, the problem manifested itself by a missing error symbol in
the issues pane and a missing text marker in the editor.
Fix this by delaying creation of the icon until it is used.
Change-Id: I5349f21c6c0d9bc39a5000ceb33faf88ea62eeac
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/taskmodel.cpp')
-rw-r--r-- | src/plugins/projectexplorer/taskmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp index 7dc9f66b53..a52f2ff3ac 100644 --- a/src/plugins/projectexplorer/taskmodel.cpp +++ b/src/plugins/projectexplorer/taskmodel.cpp @@ -255,7 +255,7 @@ QVariant TaskModel::data(const QModelIndex &index, int role) const else if (role == TaskModel::Category) return m_tasks.at(index.row()).category.uniqueIdentifier(); else if (role == TaskModel::Icon) - return m_tasks.at(index.row()).icon; + return m_tasks.at(index.row()).icon(); else if (role == TaskModel::Task_t) return QVariant::fromValue(task(index)); return QVariant(); |