[Kde-pim] [patch] Printing emails

Jaroslaw Staniek js at iidea.pl
Tue Jul 8 16:43:54 BST 2008


Thomas McGuire said the following, On 2008-07-08 17:05:
> Hi,
> 
> On Tuesday 08 July 2008 10:21:27 Jaroslaw Staniek wrote:
>> Till Adam said the following, On 2008-07-08 09:52:
>>> I don't understand this comment in relation to your fix. Can you please
>>> explain what you mean here?
>> Please see the attached patch. It does the same as using QTimer N times,
>> and fixes the problem on Windows, because now KMReaderWin::printMsg() is
>> not reached until the loop ends.
> I'd rather avoid processEvents() or even custom event loops, they cause a lot 
> of nasty problems. Please go with Ingo's suggestion instead.

Well, I don't propose custom event loop. Loops with processEvents() (used in 
38 places in KDEPIM and used by me in Kexi), if properly used, is better than 
overlaping signal-slot sequences.

I am asking about this single case. What difference can you see between these?

1. proposed by me

	dosomething();
	qApp->processEvents(); //will perform some actions from the main loop
	dosomething();
	qApp->processEvents(); //will perform some actions from the main loop
	dosomething();
	qApp->processEvents(); //will perform some actions from the main loop
	dosomething();
	qApp->processEvents(); //will perform some actions from the main loop
	dosomething();
	qApp->processEvents(); //will perform some actions from the main loop
	...

2.
	QTimer::singleShot();
	// perform some actions from the main loop
	dosomething(); //executed by QTimer::singleShot
	QTimer::singleShot();
	// perform some actions from the main loop
	dosomething(); //executed by QTimer::singleShot
	QTimer::singleShot();
	// perform some actions from the main loop
	dosomething(); //executed by QTimer::singleShot
	QTimer::singleShot();
	// perform some actions from the main loop
	dosomething(); //executed by QTimer::singleShot
	...


-- 
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