[Kde-pim] [patch] Printing emails
Jaroslaw Staniek
js at iidea.pl
Tue Jul 8 00:22:43 BST 2008
Ingo Klöcker said the following, On 2008-07-08 00:14:
> On Monday 07 July 2008, Jaroslaw Staniek wrote:
>> Possible fix for [1] (Windows).
>> For review.
>>
>> The code (before patching) works on Linux (?) only by accident, I
>> guess (probably thanks to different strategy of handling QTimers with
>> 0 delay [2]).
>>
>> Explanation: KMReaderWin::printMsg() _can_ be executed before the
>> timer handling slotWriteNextHtmlChunk() finishes. And it is, on
>> Windows. Another place where usign timers looks unfortunate..
>>
>> [1] http://intevation.de/roundup/kolab/issue2647
>> [2] mHtmlTimer.start( 0 );
>
> The correct fix would be making sure that printMsg() is not called
> before writting the HTML is finished (probably by introducing a new
> signal and listening to it). I'm not sure your patch is a good fix
> since it is clearly against the intent of KHtmlPartHtmlWriter to write
> the full queue synchronously to the HTML part.
That's true. My opinion is however that putting
QCoreApplication::processEvents() in the loop does the same (but less complex)
job as playing with a sequence QTimer::start(0)'s.
--
regards / pozdrawiam, Jaroslaw Staniek
Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
KDE Libraries for MS Windows (http://windows.kde.org)
_______________________________________________
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