[Qt-interest] Asynchronous quitting of Symbian application

Pritam Ghanghas pritam_ghanghas at infosys.com
Tue Sep 27 16:22:57 CEST 2011


On Tue, 2011-09-27 at 17:16 +0530, Bo Elmgreen wrote:
> 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?

Look at documentation of QWidget::closeEvent().
handle this event and quit when you are ready.

> 
> Thanks in advance!
> 
> Best Regards,
> Bo
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***



More information about the Qt-interest-old mailing list