[Kde-imaging] extragear/graphics/kipi-plugins/acquireimages/twainiface
Gilles Caulier
caulier.gilles at gmail.com
Thu Oct 30 09:58:04 CET 2008
SVN commit 877750 by cgilles:
Patrick: Look this commit. there is a bug in KDElibs i think... This is the code of a stand alone version of acquire image kipi-plugin using TWAIN interface (twainiface.exe)
Why when i uncomment this line, we have an eternal loop ?
This problem is reproductible in showfoto. Load an image and try to save it. the code is the same in showfoto...
CCMAIL: ps_ml at gmx.de
CCMAIL: digikam-devel at kde.org
CCMAIL: kde-imaging at kde.org
M +5 -5 twaindialog.cpp
--- trunk/extragear/graphics/kipi-plugins/acquireimages/twainiface/twaindialog.cpp #877749:877750
@@ -212,8 +212,6 @@
writableMimetypes.insert(1, "image/jpeg");
writableMimetypes.insert(2, "image/tiff");
- //QMessageBox::critical(this, QString(), writableMimetypes.join(","));
-
kDebug( 51000 ) << "slotSaveImage: Offered mimetypes: " << writableMimetypes;
QString defaultMimeType("image/png");
@@ -223,13 +221,15 @@
KUrl uurl = KGlobalSettings::documentPath();
if (d->interface) uurl = d->interface->currentAlbum().uploadPath();
- KFileDialog imageFileSaveDialog(uurl, QString(), 0);
+ KFileDialog imageFileSaveDialog(uurl, QString(), this);
- imageFileSaveDialog.setModal(false);
- imageFileSaveDialog.setOperationMode(KFileDialog::Saving);
+/* FIXME: This line make an eternal loop under Windows. why ???
+ imageFileSaveDialog.setOperationMode(KFileDialog::Saving);*/
+
imageFileSaveDialog.setMode(KFile::File);
imageFileSaveDialog.setSelection(defaultFileName);
imageFileSaveDialog.setCaption(i18n("New Image File Name"));
+ imageFileSaveDialog.setModal(false);
imageFileSaveDialog.setMimeFilter(writableMimetypes, defaultMimeType);
// Start dialog and check if canceled.
More information about the Kde-imaging
mailing list