[Digikam-devel] [Bug 136643] showfoto can open CRW, but not shown in file dialogue

simon at margo.student.utwente.nl simon at margo.student.utwente.nl
Sat Nov 4 19:05:01 GMT 2006

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

------- Additional Comments From simon margo student utwente nl  2006-11-04 20:05 -------
Looking at the code, could it be going wrong here (from showfoto.cpp:line 496)
I don't know anything about the code, but could it be that the KDE version isn't determined correctly in the ifdef? Or that the extensions list in KDE may have been updated to be complete now? It seems like a weird workaround for a temporary problem...

void ShowFoto::slotOpenFile()
    if (d->currentItem && !promptUserSave(d->currentItem->url()))

    QString fileformats;

#if KDE_IS_VERSION(3,5,2)
    //-- With KDE version >= 3.5.2, "image/x-raw" type mime exist ------------------------------

    // TODO: - Remove all image/x-raw file format given by KDE and check if dcraw is available.
    //       - Use the Raw file extension giving by digiKam API instead, because the list given
    //         by KDE is uncomplete.
    fileformats = KImageIO::mimeTypes(KImageIO::Reading).join(" ");
    //-- with KDE version < 3.5.2, we need to add all camera RAW file formats ------------------

    QStringList patternList = QStringList::split('\n', KImageIO::pattern(KImageIO::Reading));

    // All Pictures from list must been always the first entry given by KDE API
    QString allPictures = patternList[0];

    // Add RAW file format to All Pictures" type mime and remplace current.
    if (Digikam::DcrawBinary::instance()->versionIsRight())
        allPictures.insert(allPictures.find("|"), QString(raw_file_extentions));

    // Added RAW file formats supported by dcraw program like a type mime.
    // Nota: we cannot use here "image/x-raw" type mime from KDE because it
    // will be only available for KDE 3.5.2, not before (see file #121242 in B.K.O).
    if (Digikam::DcrawBinary::instance()->versionIsRight())
        patternList.append(i18n("\n%1|Camera RAW files").arg(QString(raw_file_extentions)));

    fileformats = patternList.join("\n");

More information about the Digikam-devel mailing list