(*** This bug was imported into bugs.kde.org ***) Package: konqueror Version: 2.2.1 (using KDE 2.2.1 ) Severity: normal Installed from: Mandrake RPMs Compiler: Not Specified OS: Linux OS/Compiler notes: Not Specified Creating an image gallery creates and "empty" page when directory contains xpm files. By empty I mean the html file has no images. (Submitted via bugs.kde.org) (Called from KBugReport dialog. Fields KDE Version OS Compiler manually changed)
Subject: kdeaddons/konq-plugins/kimgalleryplugin CVS commit by orlovich: -Use KImageIO to find out list of supported extensions, and don't hardcode it. Fixes #33338 - XPM files getting ignored. CCMAIL: 33338-done@bugs.kde.org M +8 -1 imgalleryplugin.cpp 1.38 --- kdeaddons/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp #1.37:1.38 @@ -36,4 +36,5 @@ Boston, MA 02111-1307, USA. #include <kurl.h> #include <kapplication.h> +#include <kimageio.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -279,5 +281,10 @@ bool KImGalleryPlugin::createHtml(const kdDebug() << "sourceDirName: " << sourceDirName << endl; - QDir imageDir( sourceDirName, "*.png *.PNG *.gif *.GIF *.jpg *.JPG *.jpeg *.JPEG *.bmp *.BMP", + QString suffixes; + //We're interested in only the patterns, so look for the first | + //#### perhaps an accessor should be added to KImageIO instead? + QString filter = KImageIO::pattern(KImageIO::Reading).section('|', 0, 0); + + QDir imageDir( sourceDirName, filter.latin1(), QDir::Name|QDir::IgnoreCase, QDir::Files|QDir::Readable);