From 83ecf1e97d13fb94023cf4a43e9ae45702e4a762 Mon Sep 17 00:00:00 2001 From: Dyami Caliri Date: Wed, 18 Jun 2014 10:58:10 -0700 Subject: [PATCH] Cocoa: cleanup modal sessions for dialogs not run with .exec() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For modal dialogs not run through QDialog.exec(), the modal sessions were not cleaned up, causing the application's menus to be inaccessible. Task-number: QTBUG-37699 Change-Id: I2704c23fec8989aa2e8ddcc3d5e3f21bb6c5db73 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index e7f8992c6d..4328487f63 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -870,6 +870,9 @@ void QCocoaEventDispatcherPrivate::processPostedEvents() return; } + if (cleanupModalSessionsNeeded && currentExecIsNSAppRun) + cleanupModalSessions(); + if (processEventsCalled > 0 && interrupt) { if (currentExecIsNSAppRun) { // The event dispatcher has been interrupted. But since