From 9335f67307168f7a3275f90b8bfe769b73ddd4d9 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 13 Oct 2022 14:50:34 +0200 Subject: [PATCH] Fix that Open Documents no longer showed "pinned" icon Or "locked" icon. Amends 373b9f8b310254c526ca12a003e066d085655e5d Change-Id: Ieaf10ade422dce65700c3b4360b496a1cec70160 Reviewed-by: Cristian Adam Reviewed-by: Qt CI Bot Reviewed-by: --- src/plugins/coreplugin/editormanager/openeditorsview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp index 87e4174d2fd..f87d40000dd 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp @@ -205,6 +205,9 @@ void ProxyModel::setSourceModel(QAbstractItemModel *sm) QVariant ProxyModel::data(const QModelIndex &index, int role) const { if (role == Qt::DecorationRole && index.column() == 0) { + const QVariant sourceDecoration = QAbstractProxyModel::data(index, role); + if (sourceDecoration.isValid()) + return sourceDecoration; const QString fileName = QAbstractProxyModel::data(index, Qt::DisplayRole).toString(); return Utils::FileIconProvider::icon(Utils::FilePath::fromString(fileName)); }