diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-08 10:27:48 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-09 10:17:11 +0000 |
commit | ec3aac74a4812b18e483f524e991e9e0bbcd0bdb (patch) | |
tree | 352de58ec59c362ab7c35711a7188f937e131422 /src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp | |
parent | dcf7247e0572768cf085f7394747ad1675549469 (diff) | |
download | qtbase-ec3aac74a4812b18e483f524e991e9e0bbcd0bdb.tar.gz |
Plumb QMessageBox::setCheckBox() through QPlatformMessageDialogHelper
Without this plumbing we have no way of knowing if the QMessageBox
has a checkbox set, and can't decide to skip the native dialog,
leaving the user without the expected checkbox.
As the suppression checkbox on macOS can be customized, we can use
this plumbing to actually provide native dialog support for generic
check boxes.
This mechanism can also be used by QErrorMessage, which now matches
behavior between native and non-native dialogs in terms of the label
of the checkbox and its initial state. We might want to tweak this
in the future, since user's might expect the suppression label and
state to match the system default, but that's something we can
expose from the platform theme if so, and should apply equally
to the non-native dialog.
Fixes: QTBUG-111803
Change-Id: Ied9fc34383fe79fbd8437592ad1c1993b9396178
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a0313c85a9b8ab6ba0ec273f0c8638e2f7b8cc18)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp index 05dd671122..56b1ffd830 100644 --- a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp +++ b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp @@ -54,7 +54,7 @@ bool QAndroidPlatformMessageDialogHelper::show(Qt::WindowFlags windowFlags, if (!opt.data()) return false; - if (opt->supressionCheckBoxEnabled()) + if (!opt->checkBoxLabel().isNull()) return false; // Can't support m_javaMessageDialog.callMethod<void>("setIcon", "(I)V", opt->icon()); |