Deprecate SmallIcon/DesktopIcon/BarIcon/UserIcon/MainBarIcon and KDE::icon in favor of KIconLoader or QIcon API
Open, Needs TriagePublic

Description

A lot of this is fixed-size pixmap based, which is problematic for high dpi support.

vkrause created this task.Sep 13 2019, 2:07 PM

UserIcon is now only used in Kolourpaint, uses in PIM were actually wrong and have been replaced.

I just ported Kolourpaint away from UserIcon.

As part of this task, KDE::icon should actually be deprecated in favor of QIcon::fromTheme(). Seems it's not yet deprecated.

As part of this task, KDE::icon should actually be deprecated in favor of QIcon::fromTheme(). Seems it's not yet deprecated.

KDE::icon optionally takes a list of overlays, something that QIcon::fromTheme() cannot do afaik

OK then we could deprecate KDE::icon(1 arg), and keep KDE::icon(2 args)

nicolasfella added a comment.EditedDec 2 2019, 12:13 AM

Another usage of KDE::icon that is not trivially replacable by QIcon::fromTheme:
https://cgit.kde.org/systemsettings.git/tree/sidebar/ToolTips/tooltipmanager.cpp#n224

It's using KIconLoader with a custom palette

For overlays there's an alternative with KIconUtils from KGuiAddons.
Besides that it might still make sense to move from KDE::Icon to the more canonical KIconLoader API, we use the KDE:: namespace nowhere else AFAIK.

DesktopIcon is now only used in kexi

Wow I had never seen KIconUtils. This is very nice stuff (because very independent from anything else).

I also agree that KDE:: is weird and that a KIconLoader method would be better unless KIconUtils can do the job.