diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-04-24 16:48:14 +0200 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-05-13 11:18:21 +0000 |
commit | 21e6c7ae4745a76b676dfaa9fe17a2dd40fc0c5c (patch) | |
tree | d2c4014d82e26417a10f5dc9535d56d5145c012b /src/gui/kernel/qplatformdialoghelper.cpp | |
parent | 2ca1253b13e77643b3d2dd993a038ae2df882311 (diff) |
Cocoa integration - implement Qt::WindowModal file dialogs
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 <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qplatformdialoghelper.cpp')
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 |