[renamedialog] Replace KIconLoader usage with QIcon::fromTheme
ClosedPublic

Authored by nicolasfella on Dec 3 2019, 12:45 AM.

Details

Test Plan

Triggered rename dialog. Still have icons in there

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Dec 3 2019, 12:45 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 3 2019, 12:45 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
nicolasfella requested review of this revision.Dec 3 2019, 12:45 AM

From what I understood loadMimeTypeIcon has this fallback to use "Unknown" icon, see D15451

  • Fall back to application-octet-stream

It's a bit ugly that fallback is a QIcon, not a QString :/
I will send a patch to Qt

Why is it ugly? I think the fallback is usually meant to fall back to e.g. a built-in icon pixmap, but doing a chain of fromTheme fallbacks is just fine imho.

Well, there are certainly more ugly things out there :)

dfaure accepted this revision.Apr 11 2020, 8:24 AM

loadMimeTypeIcon isn't deprecated, so what's the reason? Porting away from kiconthemes? Should we actually deprecate it?

This revision is now accepted and ready to land.Apr 11 2020, 8:24 AM

loadMimeTypeIcon isn't deprecated, so what's the reason? Porting away from kiconthemes? Should we actually deprecate it?

It's been going on for a while https://phabricator.kde.org/T11637 :)

OK. Then let me change my comment to: please document in kiconloader.h how to port away from loadMimeTypeIcon, even if it's not actually deprecated.

I remember wondering the same thing at one point.

OK. Then let me change my comment to: please document in kiconloader.h how to port away from loadMimeTypeIcon, even if it's not actually deprecated.

I remember wondering the same thing at one point.

Done in D28831

This revision was automatically updated to reflect the committed changes.