broulik abandoned this revision.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D5109
To: broulik, #plasma, hein
Cc: sefaeyeoglu, rkflx, smartins, ngraham, davidedmundson, plasma-devel,
ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas,
ngraham added a comment.
Yeah, putting workarounds everywhere isn't so appealing. My preference would
be for a Qt fix, otherwise we'll be playing whack-a-mole here forever.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D5109
To: broulik, #plasma, hein
Cc:
davidedmundson added a comment.
> KIconLoader does, but even Qt's own ones QSvgIconEngine and
QPixmapIconEngine don't currently.
I did fix QPixmapIcon and QSvgIconEngine,
This should mean we can change QIcon::fromTheme to check isNull() which will
then implicitly solve this.
rkflx added subscribers: smartins, rkflx.
rkflx added a comment.
I keep stumbling upon this issue on bugzilla and wonder what we can do here?
- Fix the issue in Qt. @smartins recently opened
https://bugreports.qt.io/browse/QTBUG-63187, but besides triaging to `P3` not
much has happened
davidedmundson added a comment.
Note this patch breaks fallback loading in the case where an absolute path
for an SVG or pixmap is set.
It's possibly still worth it?
I think your analysis is right, and QIcon::fromTheme(name, fallback) also
checks availableSizes because it can't rely
hein added a comment.
Please add a comment, and I wonder if the absolutePath check should maybe be
in the code?
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D5109
To: broulik, #plasma, hein
Cc: plasma-devel, progwolff, lesliezhai, ali-mohamed,
broulik added a comment.
What's super weird about this one is that `QIcon::fromTheme` internally
actually does
if (QDir::isAbsolutePath(name)) {
return QIcon(name);
}
yet only with this patch I get an icon for `.svg` icons with an absolute path
I configured. Maybe
broulik created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
Applications can specify an absolute file path for an icon which won't work
with QIcon::fromTheme.
If a theme icon isn't find, first try to