diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-08 14:32:01 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-12 12:49:54 (GMT) |
commit | aca933dea3858c0b6db4a02063583da24e80b6c3 (patch) | |
tree | b60880ba7c6e0bbb4011fb19fd0be780be7aadfe /src/corelib/kernel/qcoreevent.h | |
parent | ab2f88e3cfbf43afd536b9946a40e936c3dcee35 (diff) | |
download | Qt-aca933dea3858c0b6db4a02063583da24e80b6c3.zip Qt-aca933dea3858c0b6db4a02063583da24e80b6c3.tar.gz Qt-aca933dea3858c0b6db4a02063583da24e80b6c3.tar.bz2 |
Cocoa: application will not quit when using dialogs
When creating a single dialog in the main function, and tell it
to exec, we run a modal dialog. But there is really no other
window on screen to be modal for. So in that case, since this is
a rather common pattern for Qt applications, we allow users to
quit the application from the dock. But this action is sendt as
an apple event. And and that point in time, cocoa has the the
apple event handler, and refuses to close down the application
because it detects a modal window.
Our solution is to install/overwrite the apple event handler for
kAEQuit _after_ cocoa has finished its own installation. But in
order to do this, we need to wait until [NSApplication run] has
started, otherwise it will not take effect. And that is what this
patch essentially does.
Diffstat (limited to 'src/corelib/kernel/qcoreevent.h')
-rw-r--r-- | src/corelib/kernel/qcoreevent.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h index 6427d17..ecca4e2 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -266,7 +266,6 @@ public: UngrabMouse = 187, GrabKeyboard = 188, UngrabKeyboard = 189, - CocoaRequestModal = 190, // Internal for requesting an application modal Cocoa Window MacGLClearDrawable = 191, // Internal Cocoa, the window has changed, so we must clear StateMachineSignal = 192, |