Support ' in styled text and document it
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 29 Sep 2022 08:39:46 +0000 (09:39 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 29 Sep 2022 08:39:46 +0000 (09:39 +0100)
Origin: https://invent.kde.org/qt/qt/qtdeclarative/-/merge_requests/3/diffs
Forwarded: not-needed
Applied-Upstream: https://invent.kde.org/qt/qt/qtdeclarative/-/commit/0dda47d9f1a22567ad8f1266be2f0cd8a9226c7f

This ensures that some translations really look ok.

Gbp-Pq: Name support_apos_in_styled_text.patch

src/quick/items/qquicktext.cpp
src/quick/util/qquickstyledtext.cpp

index 62301869338a216e16b9d486b5a99568ece4bcd9..e823ca1095675c15754d513178ebb6f7e829333d 100644 (file)
@@ -2168,7 +2168,7 @@ void QQuickText::resetMaximumLineCount()
     <img src="" align="top,middle,bottom" width="" height=""> - inline images
     <ol type="">, <ul type=""> and <li> - ordered and unordered lists
     <pre></pre> - preformatted
-    &gt; &lt; &amp;
+    &gt; &lt; &amp; &quot; &nbsp; &apos;
     \endcode
 
     \c Text.StyledText parser is strict, requiring tags to be correctly nested.
index d531fc92051b4a966a29ea4c463c7d5ca79a7ab3..a25af90414bc4e29efe02c773bf19645a272b93c 100644 (file)
@@ -564,6 +564,8 @@ void QQuickStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textI
                 textOut += QChar(60);
             else if (entity == QLatin1String("amp"))
                 textOut += QChar(38);
+            else if (entity == QLatin1String("apos"))
+                textOut += QChar(39);
             else if (entity == QLatin1String("quot"))
                 textOut += QChar(34);
             else if (entity == QLatin1String("nbsp"))