Go to file
Bradley T. Hughes d9875f7bff Cocoa: support modal windows
Qt::WindowModal windows and dialogs are shown using [NSApp
beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] as
long as they have a valid parent. Otherwise they are behave as
application modal.

Use the existing modal session support in the QCocoaEventDispatcher
(which was inherited from Qt 4) to support Qt::ApplicationModal
windows and dialogs. Some changes to this code are needed to ensure
proper behavior:

1. Window level modification is now done in
QCocoaWindow::recreateWindow() instead of in QCocoaEventDispatcher.
2. Make interrupt() use [NSApp abortModal] to stop a modal session
(previously we were freeing memory from under Cocoa's feet, causing
tools like valgrind and Instruments.app to complain)
3. Do not remove an item from a list and use a const reference to the
removed item immediately after (minor bug fix).

Also make sure that QCocoaEventDispatcher cleans up any modal sessions
and retained user input events on destruction (otherwise we leave
NSApplication in a weird state, which causes some autotest failures).

Change-Id: Iaeefa025400f324b5348b8c81a40384ef026efb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-25 14:58:36 +02:00
bin Ignore moduledir/doc in syncqt 2012-04-17 23:16:51 +02:00
config.tests Ensure that qXXXdetection.h can be included directly 2012-04-21 11:19:39 +02:00
dist Update the QUrl documentation concerning the encoding 2012-04-24 17:02:23 +02:00
doc Doc: Fix most QDoc errors in QtXml. 2012-04-23 09:45:24 +02:00
examples Use org.example instead of com.trolltech for the D-Bus examples 2012-04-22 21:32:33 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Warn if we use deprecated methods from Qt modules 2012-04-25 12:43:25 +02:00
qmake Don't use the QRegExp methods that modify the object [qmake] 2012-04-23 19:20:19 +02:00
src Cocoa: support modal windows 2012-04-25 14:58:36 +02:00
tests Skip tst_QInputDialog on Mac OS X 2012-04-25 14:58:36 +02:00
tools Make configure.exe not overwrite its own Makefile in -fast mode 2012-04-25 12:43:25 +02:00
util qunicodetables generator: improve the output and the generated code 2012-04-24 21:45:00 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Add imports directory to ignore list 2012-04-11 01:42:12 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure Fix detection of default platform plugin. 2012-04-19 16:40:29 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro device: Add -device and -device-option to configure 2012-03-27 05:35:57 +02:00
sync.profile Add qprocessordetection.h 2012-02-08 12:33:11 +01:00