[Digikam-devel] Re: Win32 : send to trash a file

Gilles Caulier caulier.gilles at gmail.com
Mon Oct 4 13:52:30 BST 2010


---------- Forwarded message ----------
From: Gilles Caulier <caulier.gilles at gmail.com>
Date: 2010/10/4
Subject: Re: [Digikam-devel] Re: Win32 : send to trash a file
To: digiKam developers room - digiKam - Manage your photographs as a
professional with the power of open source <digikam-devel at kde.org>


Marcel,

More info there :

I set some debug print on the console (redirected to debugview under windows)

I patched imageviewutilities.cp like this :

--- C:/Users/Gilles/AppData/Local/Temp/imageviewutilities.cp-revBASE.svn001.tmp.cpp
    lun.
oct.  4 14:30:56 2010
+++ D:/devel/mingw/graphics/digikam/digikam/imageviewutilities.cpp      lun.
oct.  4 12:16:49 2010
@@ -149,7 +149,7 @@
    bool useTrash = !dialog.shouldDelete();

    // trash does not like non-local URLs, put is not implemented
-    KIO::Job* job = DIO::del(useTrash ? urlList : kioUrlList, useTrash);
+    KIO::Job* job = DIO::del(/*useTrash ? urlList : */kioUrlList, useTrash);

    connect(job, SIGNAL(result(KJob*)),
            this, SLOT(slotDIOResult(KJob*)));

...and now, digiKam kioslave said that trash cannot be access. Look my
screenshot for details :

http://www.flickr.com/photos/digikam/5051036506/

More interesting, is about to move file. i can move item from digiKam
album to another one without any problem. Only trash is a problem
under windows.

Gilles

2010/10/3 Marcel Wiesweg <marcel.wiesweg at gmx.de>:
>
>> [5340] Debug:digikam(5340) KUrl::path: converted to local file - the
>> related call should be converted to toLocalFile()
>> "/C:/Users/Gilles/Pictures/digikam1.5.0-windows-lensfuntools.png"
>>
>> The question is : why there is a "/" on the front of
>> "/C:/Users/Gilles/Pictures/digikam1.5.0-windows-lensfuntools.png" ???
>
> Yes, this error message is potentially very helpful.
> We must use everywhere toLocalFile() instead of path() when converting a KUrl
> to a file path - because as you see, path() will break under Windows.
> That could explain our problems.
>
> Not every occurrence of path() should be replaced. I remember to have manually
> checked path() calls to convert all where applicable. But I must have missed
> one.
>
> Can you find out, perhaps by setting a breakpoint on KUrl::path() before
> pressing delete, where that error message comes from?
>
> Marcel
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>



More information about the Digikam-devel mailing list