diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-12-25 14:24:44 +0300 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-10-02 19:50:55 +0000 |
commit | eafca2229b007f53685fabe9a6217f0eb4c8b67f (patch) | |
tree | 70ea27b323b41694f1b67db7c97ba0d5e49e1357 /src/gui | |
parent | 73bc1cf92fc27ce764eac177f2996501be67c49f (diff) |
Allow to prevent blocking of native dialogs by a proxy Qt dialog
When native dialogs become visible, their invisible proxy Qt dialog
blocks input to Qt windows. It is intended for native dialogs which
can't block Qt windows themselves, e.g. on Android. But this behavior
is incompatible with native dialogs which are implemented as in-process
Qt windows, because the proxy dialog blocks them as well.
This change introduces QPlatformDialogHelper::DialogIsQtWindow
style which allows to detect such cases and prevent blocking.
Change-Id: I8f1f741e05d09f2c27192890bcec35fdd2e8f074
Task-number: QTBUG-58116
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.cpp | 12 | ||||
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp index b787629f6a..6a0adca9ca 100644 --- a/src/gui/kernel/qplatformdialoghelper.cpp +++ b/src/gui/kernel/qplatformdialoghelper.cpp @@ -61,6 +61,18 @@ QT_BEGIN_NAMESPACE */ +/*! + \enum QPlatformDialogHelper::StyleHint + + This enum type specifies platform-specific style hints. + + \value DialogIsQtWindow Indicates that a platform-specific dialog is implemented + as in-process Qt window. It allows to prevent blocking the + dialog by an invisible proxy Qt dialog. + + \sa styleHint() +*/ + static const int buttonRoleLayouts[2][6][14] = { // Qt::Horizontal diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h index 2c050535d8..0832e19dc3 100644 --- a/src/gui/kernel/qplatformdialoghelper.h +++ b/src/gui/kernel/qplatformdialoghelper.h @@ -80,6 +80,7 @@ class Q_GUI_EXPORT QPlatformDialogHelper : public QObject Q_OBJECT public: enum StyleHint { + DialogIsQtWindow }; enum DialogCode { Rejected, Accepted }; |