From 21e6c7ae4745a76b676dfaa9fe17a2dd40fc0c5c Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 24 Apr 2015 16:48:14 +0200 Subject: Cocoa integration - implement Qt::WindowModal file dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, for Qt::WindowModal dialogs we were creating modal sheet with beginSheetModalForWindow: and later (from exec) calling -runModal, essentially making a window modal dialog into (now) application modal sheet, which is not right- it's centered relative to desktop and the jump from window modal sheet's position (centered relative to a window) to application modal was quite visible. Now, instead of [panel runModal] (== [NSApp runModalForWindow:panel]) we call [NSApp runModalForWindow:theRequiredWindow]. Change-Id: I793dc72c7d1fe96497bb35754f4d0eac9a5e00e5 Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/qplatformdialoghelper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/kernel/qplatformdialoghelper.cpp') diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp index 3d37088182..3d7c2f7bf0 100644 --- a/src/gui/kernel/qplatformdialoghelper.cpp +++ b/src/gui/kernel/qplatformdialoghelper.cpp @@ -137,6 +137,12 @@ QVariant QPlatformDialogHelper::defaultStyleHint(QPlatformDialogHelper::StyleHi return QVariant(); } +void QPlatformDialogHelper::execModalForWindow(QWindow *parent) +{ + Q_UNUSED(parent); + exec(); +} + // Font dialog class QFontDialogOptionsPrivate : public QSharedData -- cgit v1.2.3