This problem appears in Plasma, where some icons are replaced by "unknown" icon. When I try to re size icon to smaller size, it appears back again. So problem is it returns unknown icon instead of largest available icon.
Steps to Reproduce:
1. If you have kde-workspace and plasmoidviewer installed,
2. plasmoidviewer -a org.kde.plasma.showActivityManager
3. Resize applet to smaller size
At start icon does not appear, but when you resize applet icon appears.
Icon should also appear at start
*** Bug 334332 has been marked as a duplicate of this bug. ***
I'm running into the same problem in Application Menu (aka Kicker): I have a QML delegate using QIconItem backed by a model supplying QIcons created via QIcon::fromTheme(<icon name>). The delegate uses 16x16 icons on a standard DPI system. If an app doesn't have a 16x16 icon installed, QIconItem winds up showing the "unknown" placeholder. In KDE 4, it would scale down from the available 24x24 icon instead. See bug 334332 for more.
Should be reported to Qt with a testcase...
Quoting the QIcon documentation:
"The default engine scales pixmaps down if required, [...]"
So this is a bug, AFAICS, not a missing feature.
Git commit aa0035d0a69e84c053f6b4504e479fc14ef1cdd2 by Martin Klapetek.
Committed on 30/05/2014 at 10:55.
Pushed by mklapetek into branch 'master'.
Fix looking up icons
What the current code does is looking for the best match, storing it
into QString path...and then overwrite it with empty string on next run
if the icon is not found in the current dir. So we need to check first
if the icon is available in the theme and only then store the path,
otherwise empty string gets returned non-deterministically.
This also fixes case of some missing icons in Plasma Next.
M +6 -2 src/kicontheme.cpp