D5109: [Kicker/App Entry] Try QIcon with path if no theme icon is found
David Edmundson
noreply at phabricator.kde.org
Mon Mar 20 14:54:52 UTC 2017
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 on all engines implementing the new isNull virtual.
KIconLoader does, but even Qt's own ones QSvgIconEngine and QPixmapIconEngine don't currently.
INLINE COMMENTS
> appentry.cpp:107-109
> + if (m_icon.isNull()) {
> + m_icon = QIcon(m_service->icon());
> + }
This should be just:
icon = QIcon::fromTheme(m_service->icon();
if (icon.isNull()) {
icon = QIcon::fromTheme("unknown")
}
you don't need that bit in the middle.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D5109
To: broulik, #plasma, hein
Cc: davidedmundson, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170320/15a0d8d0/attachment.html>
More information about the Plasma-devel
mailing list