Possible drag and drop actions for KURLDrag

Wilco Greven greven at kde.org
Sat Oct 16 00:18:40 BST 2004

Op zaterdag 16 oktober 2004 00:29, schreef David Faure:
> [..]
> Hmm, indeed konqueror doesn't check this. It sounds like a missing
> QDropEvent (or XDND) feature. If we check QDropEvent::action() then we
> would never offer copy/move/link, since action() is always one of those,
> never "unknown, let the user choose". QDropEvent seems to think that the
> source always decides on the action, never the destination, and konqueror
> wants to do exactly the opposite.
> It sounds to me like you shouldn't use KURLDrag at all. We support drops
> of "any kind of data" on konqueror and kdesktop. You should see a "File
> name for dropped contents" dialog asking you for the filename.

I know, but the reason I added the KURLDrag was to make it possible to add a 
cover as an attachment in kmail. 

> If your problem is that you don't want to see this dialog, then we could
> add support for a "suggested filename" in the dragobject, as a separate
> kde-specific mimetype (like we do for x-kde-cutselection in konq_drag.cc).

If there's a need for such a mimetype, when it's not only amarok which will 
use it, I think it's a good idea. There's already one other case which is 
similar and that's dragging a screenshot from ksnapshot.

I just read the docs on the X Drag Save protocol 
http://rox.sourceforge.net/xds.html again. It addresses the same problem, but 
it leaves the task to save the data to the drag source instead of the target.

More information about the kde-core-devel mailing list