digikam/renamepreview.patch

29 lines
1.1 KiB
Diff

--- digikam/utilities/cameragui/cameracontroller.cpp
+++ digikam/utilities/cameragui/cameracontroller.cpp
@@ -56,6 +56,7 @@
#include <kmessagebox.h>
#include <kio/renamedlg.h>
#include <kstandarddirs.h>
+#include <ktempfile.h>
// Local includes.
@@ -1141,12 +1142,16 @@
// FIXME : see B.K.O #126427: with Gphoto camera, the camera folder is not
// mounted in local and camera picture cannot be display like a preview in dialog.
+ KTempFile tmp;
+ tmp.close();
+ d->camera->downloadItem(folder, file, tmp.name());
- KIO::RenameDlg dlg(d->parent, i18n("Rename File"), folder + QString("/") + file, dest,
+ KIO::RenameDlg dlg(d->parent, i18n("Rename File"), tmp.name(), dest,
KIO::RenameDlg_Mode(KIO::M_MULTI | KIO::M_OVERWRITE | KIO::M_SKIP));
int result = dlg.exec();
dest = dlg.newDestURL().path();
+ tmp.unlink();
switch (result)
{