aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/platform/qquickplatformmessagedialog.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-08-15 13:37:42 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-08-15 12:47:23 +0000
commit748a9418544e25c2abc6e3eb8862517bea091e7d (patch)
tree0f4a16af267f60d67931449f3bae5c7e8afb3f46 /src/imports/platform/qquickplatformmessagedialog.cpp
parente7bef190cd794b688c9428913ebcc59cd7b1c76b (diff)
Add QQuickPlatformDialog::useNativeDialog()
Change-Id: Id1699a6045eb9066a80ebdbb3cb5d3a01e58a36f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/platform/qquickplatformmessagedialog.cpp')
-rw-r--r--src/imports/platform/qquickplatformmessagedialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/imports/platform/qquickplatformmessagedialog.cpp b/src/imports/platform/qquickplatformmessagedialog.cpp
index b8d84864..842648f1 100644
--- a/src/imports/platform/qquickplatformmessagedialog.cpp
+++ b/src/imports/platform/qquickplatformmessagedialog.cpp
@@ -348,7 +348,9 @@ void QQuickPlatformMessageDialog::setButtons(QPlatformDialogHelper::StandardButt
QPlatformDialogHelper *QQuickPlatformMessageDialog::onCreate()
{
- QPlatformDialogHelper *dialog = QGuiApplicationPrivate::platformTheme()->createPlatformDialogHelper(QPlatformTheme::MessageDialog);
+ QPlatformDialogHelper *dialog = nullptr;
+ if (useNativeDialog())
+ dialog = QGuiApplicationPrivate::platformTheme()->createPlatformDialogHelper(QPlatformTheme::MessageDialog);
#ifdef QT_WIDGETS_LIB
if (!dialog)
dialog = new QWidgetPlatformMessageDialog(this);