summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qeventdispatcher_mac_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-03-22 13:40:38 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-03-22 14:00:11 (GMT)
commit35ca28a576e7d71b789211bcad00fc4f907c6e91 (patch)
tree6bc0284aee95dc90952cb7908ec60dfb54e312f8 /src/gui/kernel/qeventdispatcher_mac_p.h
parent6390248b11b3596d8c946c232e9b0d832dc42941 (diff)
downloadQt-35ca28a576e7d71b789211bcad00fc4f907c6e91.zip
Qt-35ca28a576e7d71b789211bcad00fc4f907c6e91.tar.gz
Qt-35ca28a576e7d71b789211bcad00fc4f907c6e91.tar.bz2
Cocoa: fix eventdispatcher crash, found by macgui autotest
In some cases, we end up deleting a widget before we get to end the modal session that might be attached to it. And that will cause a crash. This patch retains/releases the underlying NSWindow, so we always have a valid reference as long as the modal session is alive. Reviewed-by: msorvig
Diffstat (limited to 'src/gui/kernel/qeventdispatcher_mac_p.h')
-rw-r--r--src/gui/kernel/qeventdispatcher_mac_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qeventdispatcher_mac_p.h b/src/gui/kernel/qeventdispatcher_mac_p.h
index e932532..8ac7c65 100644
--- a/src/gui/kernel/qeventdispatcher_mac_p.h
+++ b/src/gui/kernel/qeventdispatcher_mac_p.h
@@ -100,6 +100,7 @@ typedef struct _NSModalSession *NSModalSession;
typedef struct _QCocoaModalSessionInfo {
QPointer<QWidget> widget;
NSModalSession session;
+ void *nswindow;
} QCocoaModalSessionInfo;
#endif