[Qt-interest] Asynchronous quitting of Symbian application

Bo Elmgreen bo.elmgreen at gmail.com
Tue Sep 27 13:46:27 CEST 2011


Hi all,

I am developing an application for Symbian and I have come across a 
problem, where I could use some advice :-)

My application is divided in two: A (widget-based) UI part and some 
"middleware" components, that run in their own (Q)Thread, that 
communicate with some servers over a data connection. The communication 
between the UI and the middleware is done via signals and slots.

The problem arises, when it is time to quit the application in a special 
situation. If the user selects the "Exit" option in the UI, the UI 
components can dispose of the middleware and exit the application when 
the middleware has signalled that this has completed. But if the 
application is closed from the task manager, the application will not 
know what is happening before either 1) the main window destructor is 
called or 2) it listens to the aboutToQuit signal. But in both cases it 
appears as though the application has to quit synchronously, leaving me 
with the problem that I cannot wait for the middleware to exit properly :-(

I guess that I am not the only one having this kind of design, so how is 
this situation "normally" handled?

Thanks in advance!

Best Regards,
Bo




More information about the Qt-interest-old mailing list