summaryrefslogtreecommitdiffstats
path: root/kio
diff options
context:
space:
mode:
Diffstat (limited to 'kio')
-rw-r--r--kio/kio/kfileitem.cpp5
-rw-r--r--kio/kio/kurifilter.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp
index 38e3c0e3c..6207e66b9 100644
--- a/kio/kio/kfileitem.cpp
+++ b/kio/kio/kfileitem.cpp
@@ -660,6 +660,11 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const
icon = libr_icon_geticon_bysize(handle, icon_size);
if(icon == NULL)
{
+ // Try loading the first icon as fallback
+ icon = libr_icon_geticon_byid(handle, 0);
+ }
+ if(icon == NULL)
+ {
kdWarning() << "failed to obtain ELF icon: " << libr_errmsg() << endl;
libr_close(handle);
return p;
diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp
index f16e0db7d..d0f6425ad 100644
--- a/kio/kio/kurifilter.cpp
+++ b/kio/kio/kurifilter.cpp
@@ -207,6 +207,11 @@ TQString KURIFilterData::iconName()
icon = libr_icon_geticon_bysize(handle, icon_size);
if(icon == NULL)
{
+ // Try loading the first icon as fallback
+ icon = libr_icon_geticon_byid(handle, 0);
+ }
+ if(icon == NULL)
+ {
kdWarning() << "failed to obtain ELF icon: " << libr_errmsg() << endl;
libr_close(handle);
libr_can_continue = 0;