Fix custom folder icons using an absolute path entry

Authored by muhlenpfordt on Apr 23 2018, 7:32 AM.

Description

Fix custom folder icons using an absolute path entry

Summary:
Gwenview does not display a custom folder icon which is configured
by an absolute path and the folder does not contain any images.
This is caused by KIconLoader::loadMimeTypeIcon() failing for
absolute path entries. If the folder contains images the preview
job corrects the icon later.
Using KIconLoader::loadIcon() loads the correct icon.

BUG: 315983
FIXED-IN: 18.04.2

Test Plan:

  • Create an empty folder (e.g. /tmp/parent/test-empty)
  • Set a custom icon for test-empty using an absolute path
  • Start Gwenview in Browse Mode in the parent folder
  • Folder test-empty should display the custom icon
Before:After:

Reviewers: Gwenview, rkflx

Reviewed By: Gwenview, rkflx

Subscribers: rkflx, huoni

Differential Revision: https://phabricator.kde.org/D12465

Details

Committed
muhlenpfordtMay 7 2018, 6:57 AM
Reviewer
Gwenview
Differential Revision
D12465: Fix custom folder icons using an absolute path entry
Parents
R260:ae6fc125c838: GIT_SILENT Upgrade KDE Applications version to 18.04.1.
Branches
Unknown
Tags
Unknown
References
tag: v18.04.1