aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2021-04-08 16:31:31 +0200
committerEike Ziller <eike.ziller@qt.io>2021-04-09 13:34:55 +0000
commitbce81fd9927eb8540c0029306ad87fcaa4a811ca (patch)
tree129561f47b24a2f98ab5cc5fabc981539068c614 /src/plugins/resourceeditor
parentf4ab1279fd55a00e2bede18ec9ad283c668b46bd (diff)
Projects: Create QIcons in the UI thread
Creating QIcons elsewhere is not safe because of image reader plugin loading and the pixmap cache. Fixes: QTCREATORBUG-25301 Change-Id: Ia22a0cd571f808d7f5c639353fdf2e548743f8ca Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourcenode.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp
index 88c04bbfc2..7b57a6eabf 100644
--- a/src/plugins/resourceeditor/resourcenode.cpp
+++ b/src/plugins/resourceeditor/resourcenode.cpp
@@ -243,7 +243,7 @@ ResourceTopLevelNode::ResourceTopLevelNode(const FilePath &filePath,
const QString &contents)
: FolderNode(filePath)
{
- setIcon(FileIconProvider::icon(filePath.toFileInfo()));
+ setIcon([filePath] { return FileIconProvider::icon(filePath.toFileInfo()); });
setPriority(Node::DefaultFilePriority);
setListInProject(true);
setAddFileFilter("*.png; *.jpg; *.gif; *.svg; *.ico; *.qml; *.qml.ui");