Bug 197663 - Problem with copying outside of kphotoalbum - spaces changed to %20
Summary: Problem with copying outside of kphotoalbum - spaces changed to %20
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Thumbnail Viewer (show other bugs)
Version: SVN trunk (KDE4 version)
Platform: Unlisted Binaries Linux
: NOR major
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2009-06-23 22:11 UTC by Martin Jaburek
Modified: 2009-07-18 14:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
example of error (17.41 KB, image/png)
2009-06-23 22:11 UTC, Martin Jaburek
Details
Patch which fixes drag and drop issue (10.64 KB, patch)
2009-07-18 02:12 UTC, Martin Jaburek
Details
Patch which fixes copy to clipboard (of uris) (361 bytes, patch)
2009-07-18 02:13 UTC, Martin Jaburek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jaburek 2009-06-23 22:11:46 UTC
Created attachment 34773 [details]
example of error

Description: Ubuntu 9.04
Release: 9.04
package: 3.1.1-2ubuntu3, also tried to build from SVN

It is easily reproducible bug. You must have your images in subfolders containg spaces. Then if you try to drag and drop from kphotoalbum thumbnailview into dolphin you will get an error:

The file or folder .... does not exist

See the attached screenshot.

If I use CTRL+C and paste it into the Konsole it is pasted correctly - with spaces (only filename of course)
Comment 1 Jesper Pedersen 2009-07-10 17:34:28 UTC
First of all, this must be a bug in KPhotoAlbum, and not a bug in konsole,
as the same happens when dragging to a konqueror showing a directory.

The code which sets up the drag and drop operation can be found in
ThumbnailView/SelectionInteraction.cpp, the function
ThumbnailView::SelectionInteraction::startDrag. The file name is encoded
into a QUrl using QUrl(fileName). I suspect that is the wrong way of
building that URL, try looking at the documentation for QUrl and perhaps
KUrl.

When fixing this bug, please ensure that you are not breaking the dragging
inside the thumbnail viewer for reordering images.
Comment 2 Martin Jaburek 2009-07-15 21:26:34 UTC
Am I the only one suffering by this severe bug?
Comment 3 Jesper Pedersen 2009-07-15 22:39:49 UTC
No, as I wrote above, I can reproduce that too. Now we are just waiting for someone to come along and fix it.
Comment 4 Martin Jaburek 2009-07-18 02:12:10 UTC
Created attachment 35423 [details]
Patch which fixes drag and drop issue
Comment 5 Martin Jaburek 2009-07-18 02:13:25 UTC
Created attachment 35424 [details]
Patch which fixes copy to clipboard (of uris)
Comment 6 Martin Jaburek 2009-07-18 02:15:21 UTC
I think I found solution, please check the patch. It worked for me. It was indeed the problem KUrl/QUrl. Patches are done against this snapshot: kphotoalbum-20090711.tar.bz2
Comment 7 Jan Kundrát 2009-07-18 04:45:40 UTC
Please don't close a bug when the fix is not in the SVN yet. Also please submit unidiff patches (the "-u" option for diff) instead of the traditional format.
Comment 8 Tuomas Suutari 2009-07-18 13:02:52 UTC
SVN commit 998686 by suutari:

Fix URL interaction with other KDE applications

This should fix the issue of bug 197663 that spaces in URLs are
encoded incorrectly as %20 when files are dragged from KPhotoAlbum to
other KDE application. Also the "Copy to clipboard" action is fixed.

Thanks to Martin Jaburek for the patch.

From: Martin Jaburek <longmatys@gmail.com>

CCBUG: 197663

 M  +3 -6      MainWindow/Window.cpp  
 M  +21 -3     ThumbnailView/SelectionInteraction.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=998686