diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-08-11 14:02:27 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-08-14 10:47:47 (GMT) |
commit | dc2070d82c3d3cd972a52df680c6df9d2989f3e4 (patch) | |
tree | bc4a905853ece743966427a41ccf04b9374729c3 /src/gui/kernel/qapplication_p.h | |
parent | 433ae0c05079f09293667e495bdb3583616cec6c (diff) | |
download | Qt-dc2070d82c3d3cd972a52df680c6df9d2989f3e4.zip Qt-dc2070d82c3d3cd972a52df680c6df9d2989f3e4.tar.gz Qt-dc2070d82c3d3cd972a52df680c6df9d2989f3e4.tar.bz2 |
Cocoa: Fix several issues with the event dispatcher
Autotest: qcoreapplication, qapplication, qtimer
qwidget_window, qwidget
Issue 1: stacking order of modal windows was not
working correctly. With this patch, we remove the
need for rebuilding modal sessions all the time,
and when we do, we rebuild them all in the correct
order.
Issue 2: When running the event processor manually
(that is, just calling processEvents in a loop), we
sometimes spendt 100% cpu if a window was pending to
become modal. The reason was that we need to keep
reposting the QCocoaRequestModal event until we
could block the calling thread (that is, one of
the exec flags was given to processEvents). With this
patch, the need for posting QCocoaRequestModal is
completly removed in favor of an 'interrupt'
approach instead.
Issue 3: If using Qt as a plugin, or just add widget
to a native cocoa application, it would often lead
to closing down the application. The reason is that
the event dispatcher needs to restart [NSApp run]
now and then. But this approach fails if Qt was not
the code that started [NSApp run] in the first place.
This patch removes the need to restart NSApp in this
situation, at the cost of modal windows not beeing
modal if Qt is not spinning the event dispatcher.
Normal QDialog::exec etc will always work.
Diffstat (limited to 'src/gui/kernel/qapplication_p.h')
-rw-r--r-- | src/gui/kernel/qapplication_p.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index c90ebfe..5d409f4 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -484,12 +484,6 @@ public: void _q_alertTimeOut(); QHash<QWidget *, QTimer *> alertTimerHash; #endif -#if defined(QT_MAC_USE_COCOA) - void _q_runAppModalWindow(); -#endif -#if defined(QT_MAC_USE_COCOA) - void _q_runModalWindow(); -#endif #ifndef QT_NO_STYLE_STYLESHEET static QString styleSheet; #endif |