https://bugs.kde.org/show_bug.cgi?id=358909

--- Comment #14 from Alexis M. <amurzeau...@gmail.com> ---
I tracked down the faulty code with gdb and got:
#0  0x00007ffff78396d5 in __GI___xstat (vers=vers@entry=1,
name=name@entry=0xd460a8
"/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.png",
buf=buf@entry=0x7fffffffb440)
    at ../sysdeps/unix/sysv/linux/wordsize-64/xstat.c:35
#1  0x00007ffff253eb90 in stat64 (__statbuf=0x7fffffffb440, __path=0xd460a8
"/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.png") at
/usr/include/x86_64-linux-gnu/sys/stat.h:503
#2  QFileSystemEngine::fillMetaData (entry=..., data=..., what=...,
what@entry=...) at io/qfilesystemengine_unix.cpp:480
#3  0x00007ffff24d2bd0 in QFileInfo::exists (file=...) at io/qfileinfo.cpp:703
#4  0x00007ffff24cae75 in QFile::exists (fileName=...) at io/qfile.cpp:431
#5  0x00007ffff24bcffb in QDir::exists (this=this@entry=0x7fffffffb6d0,
name=...) at io/qdir.cpp:1809
#6  0x00007ffff2979c50 in QIconLoader::findIconHelper
(this=this@entry=0x7ffff2d42420 <(anonymous
namespace)::Q_QGS_iconLoaderInstance::innerFunction()::holder>, themeName=...,
iconName=..., 
    visited=...) at image/qiconloader.cpp:284
#7  0x00007ffff297b80f in QIconLoader::loadIcon (this=0x7ffff2d42420
<(anonymous namespace)::Q_QGS_iconLoaderInstance::innerFunction()::holder>,
name=...) at image/qiconloader.cpp:335
#8  0x00007ffff297ba20 in QIconLoaderEngine::ensureLoaded
(this=this@entry=0xa696f0) at image/qiconloader.cpp:392
#9  0x00007ffff297bb9a in QIconLoaderEngine::ensureLoaded (this=0xa696f0) at
image/qiconloader.cpp:386
#10 QIconLoaderEngine::virtual_hook (this=0xa696f0, id=1, data=0x7fffffffb870)
at image/qiconloader.cpp:576
#11 0x00007ffff297dc78 in QIconEngine::availableSizes (this=<optimized out>,
mode=<optimized out>, state=<optimized out>) at image/qiconengine.cpp:259
#12 0x00007ffff29704ae in QIcon::availableSizes
(this=this@entry=0x7fffffffb8d0, mode=mode@entry=QIcon::Normal,
state=state@entry=QIcon::Off) at image/qicon.cpp:1056
#13 0x00007ffff29739f0 in QIcon::fromTheme (name=..., fallback=...) at
image/qicon.cpp:1190
#14 0x00007ffff74d829a in KStandardItemListWidget::pixmapForIcon (name=...,
overlays=..., size=size@entry=48)
    at
/build/dolphin-I_AGVN/dolphin-16.04.1/src/kitemviews/kstandarditemlistwidget.cpp:1449

-----------------------

The issue is that QIcon::fromTheme assume a icon name that follows freedesktop
icon specification (http://doc.qt.io/qt-5/qicon.html#fromTheme).
There was a change in review in Qt now in abandoned state that would solve this
issue: https://codereview.qt-project.org/#/c/149571

Anyway, according to the QIcon doc, I think that
KStandardItemListWidget::pixmapForIcon should try to open the icon as absolute
path :
- either before calling QIcon::fromTheme (but maybe only if its really an
absolute path to avoid weird things when a icon in working dir as the same name
as a theme icon name
- or after / as fallback icon (in pixmapForIcon, the fallback is already the
"unknown" icon)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to