KIO::iconNameForUrl: fix searching for kde protocol icons
Summary:
iconName was set to mt.iconName() at the beginning, but this returns always "application-octet-stream" making all subsequent iconName.isEmpty() check not work as expected.
This patch sets iconName to mt.iconName() only when needed.
BUG: 417922
BUG: 417921
CCBUG: 417069
FIXED-IN: 5.68
Test Plan:
In dolphin:
- open "Recent Files"
- Ctrl+T
- open any folder
- Ctrl+T
- Ctrl+F (Search
- Search for anything, type something then return
Same for smb:/ location
In all cases the protocol icon is now visible.
Reviewers: ngraham, Frameworks, dfaure, broulik, sitter
Reviewed By: ngraham, dfaure, sitter
Subscribers: sitter, kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D27539