[Kde-pim] fixing #42767 : attach directories to mail

Martin Bednár serafean at gmail.com
Thu Aug 25 15:21:15 BST 2011


Hi,

I'm trying to work on this bug to attach directories to an e-mail through 
drag&drop. I have several questions.
First : does drag&drop always pass a KUrl, or are there cases where it 
directly passes a part (can it pass a folder as a part)?

Up to now, I have just managed to detect if a KUrl points to a directory. This 
is done using the following in attachmentcontrollerbase.cpp:663 addAttachment: 
if (qstrcmp(KMimeType::findByUrl(url)->name().toAscii(),"inode/directory") == 
0). I have little to no experience with KDE/Qt/C++ in general, and am not sure 
if this is the "correct" way and place to do it.

Now that I know how to detect if I'm dealing with a folder or not, I'm 
thinking whether to use Ark::Part (if possible) or deal with it all manually 
using KZip. Personnally I'd prefer using the Ark::Part, introducing it as an 
optional dependency but, as I said, I don't have much experience, so I'm 
asking for your opinion on this...

Thanks,

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110825/4767acc8/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list