Cocoa: do not terminate applications prematurely
authorBradley T. Hughes <bradley.hughes@nokia.com>
Fri, 8 Jun 2012 11:32:22 +0000 (13:32 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 12 Jun 2012 02:29:56 +0000 (04:29 +0200)
commit0fb84aa7a9ca3ff0bb96d6d7bb7b959d47c3ddcf
treeaf1722ae2a23a10bf8f8e95c3b34a7e26af0af67
parent3abf49cdc84b47a66347efeb7fe58e252ca55e11
Cocoa: do not terminate applications prematurely

Re-enable application termination as it was in Qt 4.
QApplication::exec() must return to main() so that the destructors in
main() are run.

The QApplicationPrivate::canQuit() function from Qt 4's
qapplication_mac.mm is gone, so bring back this function in
QCocoaApplicationDelegate instead.

Change-Id: I1c21894d59061687c36ab49bcb2e4e3ae0752fa4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm