[Kde-pim] Patch for Bug #154041

Thomas McGuire Thomas.McGuire at gmx.net
Sun Feb 10 18:22:19 GMT 2008


Hi,

On Wednesday 06 February 2008, Mischael Schill wrote:
> And my second patch.
> This one is little bit bigger. I found out, that the
> readTemporaryMsg()-method in the folderstorage doesn't work
> properly. Somehow the MessageProperty for this message is set
> to "transferinprogress". I don't know if there is a real
> transfer in progress or it is just a minor fault. Using the
> slower getMsg() and unGetMsg() works fine, so I switch to these
> methods. I commented the readTemporaryMsg-Method out so that
> nobody uses it until someone can fix it (I tried, but the whole
> kmmessage-thing is like a jungle).
OK, with the help of Till, I've tracked down the problem.

readTemporaryMsg() only works correctly for messages which are already 
available locally. For remote messages, it fails, because the remote messages 
need to be fetched from the server first (the fetching is done so the reader 
window can display the message), which starts a transfer. Therefore the 
assert is hit when deleting the temporary message again.

So the use of readTemporaryMsg() for drag&drop is indeed not correct, I've 
fixed that (based on your patch) with commit 773273.

The real problem is somewhere else: In KMHeaders::contentsMouseMoveEvent(), 
the drag is started. It calls populateMimeData(), which adds all messages 
(not only the headers) to the mimedata of the drag object. This is wrong and 
the result of a porting error. With the old code, the full message was only 
retrieved on drop (by using QStoredDrag::encodedData()).

This needs to be fixed as well.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080210/82db6280/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