aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickstyledtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquickstyledtext.cpp')
-rw-r--r--src/quick/util/qquickstyledtext.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
index 762d49f2d2..5e1aaf121e 100644
--- a/src/quick/util/qquickstyledtext.cpp
+++ b/src/quick/util/qquickstyledtext.cpp
@@ -50,6 +50,8 @@
QQuickStyledText supports few tags:
<b></b> - bold
+ <del></del> - strike out (removed content)
+ <s></s> - strike out (no longer accurate or no longer relevant content)
<strong></strong> - bold
<i></i> - italic
<br> - new line
@@ -379,8 +381,16 @@ bool QQuickStyledTextPrivate::parseTag(const QChar *&ch, const QString &textIn,
format.setFontWeight(QFont::Bold);
return true;
}
- } else if (tag == QLatin1String("strong")) {
- format.setFontWeight(QFont::Bold);
+ } else if (char0 == QLatin1Char('s')) {
+ if (tagLength == 1) {
+ format.setFontStrikeOut(true);
+ return true;
+ } else if (tag == QLatin1String("strong")) {
+ format.setFontWeight(QFont::Bold);
+ return true;
+ }
+ } else if (tag == QLatin1String("del")) {
+ format.setFontStrikeOut(true);
return true;
} else if (tag == QLatin1String("ol")) {
List listItem;
@@ -511,7 +521,13 @@ bool QQuickStyledTextPrivate::parseCloseTag(const QChar *&ch, const QString &tex
return true;
} else if (tag == QLatin1String("font")) {
return true;
- } else if (tag == QLatin1String("strong")) {
+ } else if (char0 == QLatin1Char('s')) {
+ if (tagLength == 1) {
+ return true;
+ } else if (tag == QLatin1String("strong")) {
+ return true;
+ }
+ } else if (tag == QLatin1String("del")) {
return true;
} else if (tag == QLatin1String("ol")) {
if (!listStack.isEmpty()) {