summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brüning <michael.bruning@qt.io>2022-06-15 22:31:03 +0200
committerMichael Brüning <michael.bruning@qt.io>2022-06-21 10:15:32 +0200
commit86accca3d8e7aa894818c602b8616092cc02fddb (patch)
tree3cee0c5d3a499eada2ed3419039413ff590a532d
parent71562a62c502b34f8401d436c60a6359973c3ce6 (diff)
Do not use the native dialog to show the color picker on macOS
With the native dialog, there were either problems with the modality when using it asynchronously or with the life cycle when using it synchronously. Not using the native dialog avoids these problems. Task-number: QTBUG-102099 Change-Id: Icb9a9afda48c47558b8e8ecb6d89adc0961d5063 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index f4281439f..3c16ede56 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -479,6 +479,10 @@ void QWebEnginePagePrivate::showColorDialog(QSharedPointer<ColorChooserControlle
QColorDialog::connect(dialog, SIGNAL(colorSelected(QColor)), dialog, SLOT(deleteLater()));
QColorDialog::connect(dialog, SIGNAL(rejected()), dialog, SLOT(deleteLater()));
+#if defined(Q_OS_MACOS)
+ dialog->setOption(QColorDialog::DontUseNativeDialog);
+#endif
+
dialog->open();
#else
Q_UNUSED(controller);