From a6ec2f93dba2a3e4ac07332c5adf4456348bf4a1 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 21 May 2021 13:30:41 +0200 Subject: [PATCH 01/20] Give a warning when StyledText encounters a non supported entity Pick-to: 6.1 5.15 Change-Id: Iea8bdf25542cd404ee71141467ac1f1398a7d0df Reviewed-by: Fabian Kosmale (cherry picked from commit 8cd43e370040e23fcbd03ad64969e683055bd7d0) --- src/quick/util/qquickstyledtext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp index 660852ba83..d531fc9205 100644 --- a/src/quick/util/qquickstyledtext.cpp +++ b/src/quick/util/qquickstyledtext.cpp @@ -46,6 +46,8 @@ #include "qquickstyledtext_p.h" #include +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); -- 2.35.1