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>
This commit is contained in:
parent
98f326e9b8
commit
dc0c68262e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user