aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2021-05-21 13:30:41 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-26 15:40:50 +0000
commit044a84fa3fe5a8d75932079576575afc145b867a (patch)
tree145d83c7182a923c2fc6486434885b2268242d03
parent36f75c0a1b0145b50f24db397a641c1760cb351a (diff)
Give a warning when StyledText encounters a non supported entity
Change-Id: Iea8bdf25542cd404ee71141467ac1f1398a7d0df Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8cd43e370040e23fcbd03ad64969e683055bd7d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/util/qquickstyledtext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
index 93409dc566..f209a14f35 100644
--- a/src/quick/util/qquickstyledtext.cpp
+++ b/src/quick/util/qquickstyledtext.cpp
@@ -46,6 +46,8 @@
#include "qquickstyledtext_p.h"
#include <QQmlContext>
+Q_LOGGING_CATEGORY(lcStyledText, "qt.quick.styledtext")
+
/*
QQuickStyledText supports few tags:
@@ -566,6 +568,8 @@ void QQuickStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textI
textOut += QChar(34);
else if (entity == QLatin1String("nbsp"))
textOut += QChar(QChar::Nbsp);
+ else
+ qCWarning(lcStyledText) << "StyledText doesn't support entity" << entity;
return;
} else if (*ch == QLatin1Char(' ')) {
QStringRef entity(&textIn, entityStart - 1, entityLength + 1);