[PATCH] Let KUrl::List::fromMimeData() follow XDnd spec

Tobias Koenig tokoe at kde.org
Thu Nov 12 09:44:24 GMT 2009


Hej,

according to the XDnd spec, the URIs from a text/uri-list drag object must
contain a hostname from where the drag where initiated. In 99% of the time
this will be the local machine, so the hostname can be simply ignored.
In the other 1% the drag'n'drop framework would somehow have to download the
files locally and rewrite the uris (which seems to be a broken idea IMHO... well specs...)

However in trunk, KDE applications can't accept drags from applications that
follow the XDnd spec, because the KIO classes (or better said QUrl::toLocalPath()) can't
handle URIs like file://myhost/tmp/foo.pdf correctly.

The attached patch simply removes the host information in KUrl::List::fromMimeData().

Ok to commit?

Ciao,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kurl-dnd.patch
Type: text/x-diff
Size: 582 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20091112/452fbe1d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20091112/452fbe1d/attachment.sig>


More information about the kde-core-devel mailing list