Blame SOURCES/0025-Give-a-warning-when-StyledText-encounters-a-non-supp.patch

b602f4
From 6d7dfed857ab9e83ab2a917a929ce3b25342d90a Mon Sep 17 00:00:00 2001
b602f4
From: Albert Astals Cid <albert.astals.cid@kdab.com>
b602f4
Date: Fri, 21 May 2021 13:30:41 +0200
b602f4
Subject: [PATCH 25/28] Give a warning when StyledText encounters a non
b602f4
 supported entity
b602f4
b602f4
Pick-to: 6.1 5.15
b602f4
Change-Id: Iea8bdf25542cd404ee71141467ac1f1398a7d0df
b602f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
b602f4
(cherry picked from commit 8cd43e370040e23fcbd03ad64969e683055bd7d0)
b602f4
---
b602f4
 src/quick/util/qquickstyledtext.cpp | 4 ++++
b602f4
 1 file changed, 4 insertions(+)
b602f4
b602f4
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
b602f4
index 660852ba83..d531fc9205 100644
b602f4
--- a/src/quick/util/qquickstyledtext.cpp
b602f4
+++ b/src/quick/util/qquickstyledtext.cpp
b602f4
@@ -46,6 +46,8 @@
b602f4
 #include "qquickstyledtext_p.h"
b602f4
 #include <QQmlContext>
b602f4
 
b602f4
+Q_LOGGING_CATEGORY(lcStyledText, "qt.quick.styledtext")
b602f4
+
b602f4
 /*
b602f4
     QQuickStyledText supports few tags:
b602f4
 
b602f4
@@ -566,6 +568,8 @@ void QQuickStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textI
b602f4
                 textOut += QChar(34);
b602f4
             else if (entity == QLatin1String("nbsp"))
b602f4
                 textOut += QChar(QChar::Nbsp);
b602f4
+            else
b602f4
+                qCWarning(lcStyledText) << "StyledText doesn't support entity" << entity;
b602f4
             return;
b602f4
         } else if (*ch == QLatin1Char(' ')) {
b602f4
             QStringRef entity(&textIn, entityStart - 1, entityLength + 1);
b602f4
-- 
b602f4
2.31.1
b602f4