summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-04 10:55:56 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-04 13:18:31 +0000
commitdc0c68262e63b2f74268af7bbf43023b158329b8 (patch)
treedae48355de46999de9dba0bd72cfe47ac651aa5e /src
parent98f326e9b82e6dbf0ef68a16292c38276181416a (diff)
WinRT/QMessageBox: Default to QtWidgets-based dialog for rich text.
Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/winrt/qwinrtmessagedialoghelper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtmessagedialoghelper.cpp b/src/plugins/platforms/winrt/qwinrtmessagedialoghelper.cpp
index bb04144563..bad15126d4 100644
--- a/src/plugins/platforms/winrt/qwinrtmessagedialoghelper.cpp
+++ b/src/plugins/platforms/winrt/qwinrtmessagedialoghelper.cpp
@@ -37,6 +37,7 @@
#include "qwinrtmessagedialoghelper.h"
#include "qwinrttheme.h"
+#include <QtGui/QTextDocument>
#include <QtCore/qfunctions_winrt.h>
#include <private/qeventdispatcher_winrt_p.h>
@@ -110,6 +111,10 @@ bool QWinRTMessageDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModa
const QString informativeText = options->informativeText();
const QString title = options->windowTitle();
const QString text = informativeText.isEmpty() ? options->text() : (options->text() + QLatin1Char('\n') + informativeText);
+ if (Qt::mightBeRichText(text)) {
+ qWarning("Rich text detected, defaulting to QtWidgets-based dialog.");
+ return false;
+ }
HRESULT hr;
ComPtr<IMessageDialogFactory> dialogFactory;