From dc0c68262e63b2f74268af7bbf43023b158329b8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 4 Dec 2015 10:55:56 +0100 Subject: WinRT/QMessageBox: Default to QtWidgets-based dialog for rich text. Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c Reviewed-by: Andrew Knight Reviewed-by: Maurice Kalinowski --- src/plugins/platforms/winrt/qwinrtmessagedialoghelper.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 #include #include @@ -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 dialogFactory; -- cgit v1.2.3