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

laurent Montel montel at kde.org
Thu Aug 25 16:14:56 BST 2011


Le Thursday 25 August 2011 07:21:15 Martin Bednár a écrit :
> 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...

Use kzip please.
We will not add a dependency against ark.

Regards

> 
> Thanks,
> 
> Martin
_______________________________________________
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