Needing a QEventLoop for a kioslave
Ingo Klöcker
kloecker at kde.org
Wed Feb 11 21:23:07 GMT 2009
On Wednesday 11 February 2009, Thiago Macieira wrote:
> Ingo Klöcker wrote:
> >BTW, the API docs of qAddPostRoutine state that the clean-up
> > functions will be called by ~QApplication(). A quick look at the
> > code shows that they will also be called by ~QCoreApplication().
> > This should probably be clarified in the API docs.
>
> It will be called by ~QApplication. Indirectly.
>
> Remember that ~QApplication calls ~QCoreApplication.
>
> :-)
I think you misunderstood my point. The API docs read:
void qAddPostRoutine ( QtCleanUpFunction ptr )
Adds a global routine that will be called from the QApplication
destructor. This function is normally used to add cleanup routines for
program-wide functionality.
[...]
After reading this I wondered whether cleanup functions registered with
qAddPostRoutine() are also called if my non-GUI application is derived
from QCoreApplication, but not from QApplication. I had to look into
the source code of ~QCoreApplication() to resolve those doubts.
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090211/7f63f398/attachment.sig>
More information about the kde-core-devel
mailing list