Summary: | Create Image Gallery fails for xpm | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | lrnagy |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 2.2.1 | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
lrnagy
2001-10-05 17:17:19 UTC
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); |