Needing a QEventLoop for a kioslave

Thiago Macieira thiago at kde.org
Wed Feb 11 22:27:44 GMT 2009


Ingo Klöcker wrote:
>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.

You've got a point.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090211/ed51dcb7/attachment.sig>


More information about the kde-core-devel mailing list