diff options
author | David Schulz <david.schulz@qt.io> | 2021-06-08 12:54:22 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2021-06-09 12:25:19 +0000 |
commit | 43b6ada0db401fd29cb77b5ab621f786bd31483b (patch) | |
tree | 66ecf46da753937ae9bdf623089e30bb237d81ce /src/plugins/resourceeditor | |
parent | 093f3479ce19ad559d3a07263a23de6fa3e60c09 (diff) |
Core: filepathify FileIconProvider
Change-Id: Id6fcc05317f3f5144c662fb4826438407f8d9d21
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r-- | src/plugins/resourceeditor/qrceditor/resourcefile.cpp | 2 | ||||
-rw-r--r-- | src/plugins/resourceeditor/resourcenode.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 9cb8dd1e79..7b48f88ef2 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -798,7 +798,7 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const if (iconFileExtension(path)) file->icon = QIcon(path); else - file->icon = Core::FileIconProvider::icon(QFileInfo(path)); + file->icon = Core::FileIconProvider::icon(Utils::FilePath::fromString(path)); } if (!file->icon.isNull()) result = file->icon; diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index 7b57a6eabf..a6fb56fbe7 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([filePath] { return FileIconProvider::icon(filePath.toFileInfo()); }); + setIcon([filePath] { return FileIconProvider::icon(filePath); }); setPriority(Node::DefaultFilePriority); setListInProject(true); setAddFileFilter("*.png; *.jpg; *.gif; *.svg; *.ico; *.qml; *.qml.ui"); |