From 3165fe0d809e25177dd0b91964f7d0718922121e Mon Sep 17 00:00:00 2001 From: Pasi Matilainen Date: Mon, 27 Feb 2012 12:19:47 +0200 Subject: Fix modal file dialog opening on Mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a modal file dialog is opened on Mac, the native file dialog is actually opened twice, first as modeless and later as modal. Normally this works (by chance), but when the application runs in a sandbox, this results in a crash. Task-number: QTBUG-21609 Change-Id: I906868e1b4bd74dc3030891bede51f32ebd16b4a Reviewed-by: Morten Johan Sørvig --- src/gui/dialogs/qfiledialog_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 05f717e..a858aa7 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -1082,7 +1082,7 @@ bool QFileDialogPrivate::showCocoaFilePanel() QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast(mDelegate); if (qt_mac_is_macsheet(q)) [delegate showWindowModalSheet:q->parentWidget()]; - else + else if (!q->testAttribute(Qt::WA_ShowModal)) [delegate showModelessPanel]; return true; } -- cgit v0.12