Dragging files to KDesktop
Tobias Koenig
tokoe at kde.org
Sat Feb 7 11:41:42 GMT 2004
Hi,
I want to add the functionality to KAddressBook to export a vCard by
simply dragging a contact out of the program and drop it on the desktop
or in a konqueror window.
But what's the best way to do it?
QStoredDrag doesn't work because KDesktop doesn't try to decode it, it
just looks for QImageDrag, QColorDrag and KURLDrag.
But using KURLDrag + KTempFile to export the data causes two other
problems:
- you can't remove the temporary file
- the file name is something like kaddressbookXTRDR5464F... not very
user friendly
The second issue could be solved by creating a file with the name of the
contact under /tmp/ and pass this URL to the KURLDrag, but that would
allow symlinks attacks again :(
Ciao,
Tobias
--
Separate politics from religion and economy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040207/1afc6f7c/attachment.sig>
More information about the kde-core-devel
mailing list