Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
None
-
MacOS/X 10.6.3, Qt 4.7.0-tp1 or Qt 4.7.0-beta1, Cocoa
-
-
af1b64cec8ed74602fafadade936b1768daa9ff2
Description
When quitting a Qt 4.7.x app under MacOS/X, the process is rudely exited. That is incorrect behavior; what should happen is that QApplication::exec() should return, so that any necessary cleanup code can execute before the main() returns in the usual way.
To reproduce the problem:
1) Compile and run the attached main.cpp example program under Qt 4.7.0-tp1 or Qt 4.7.0-beta1.
2) When the window appears, press Command-Q (or choose Quit from the menu bar)
3) look in /tmp for a file named foo.txt. This file should have been created by the code at the bottom of main.cpp after app.exec() returned, but it doesn't happen because app.exec() never returns.
The correct behavior does occur under Qt 4.6.2 and earlier; the problem is new to Qt 4.7.x.