aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quick/util/qdeclarativestyledtext.cpp5
-rw-r--r--tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/util/qdeclarativestyledtext.cpp b/src/quick/util/qdeclarativestyledtext.cpp
index 1c7ca5fbfd..2f79fad9a2 100644
--- a/src/quick/util/qdeclarativestyledtext.cpp
+++ b/src/quick/util/qdeclarativestyledtext.cpp
@@ -253,6 +253,9 @@ bool QDeclarativeStyledTextPrivate::parseTag(const QChar *&ch, const QString &te
if (!hasNewLine)
textOut.append(QChar::LineSeparator);
}
+ } else if (char0 == QLatin1Char('s')) {
+ if (tag == QLatin1String("strong"))
+ format.setFontWeight(QFont::Bold);
} else if (char0 == QLatin1Char('u')) {
if (tagLength == 1)
format.setFontUnderline(true);
@@ -384,6 +387,8 @@ bool QDeclarativeStyledTextPrivate::parseCloseTag(const QChar *&ch, const QStrin
return true;
} else if (tag == QLatin1String("font")) {
return true;
+ } else if (tag == QLatin1String("strong")) {
+ return true;
} else if (tag == QLatin1String("ol")) {
if (!listStack.isEmpty()) {
listStack.pop();
diff --git a/tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp b/tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
index b09c33302e..2c5c66f280 100644
--- a/tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
+++ b/tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
@@ -65,6 +65,7 @@ void tst_qdeclarativestyledtext::textOutput_data()
QTest::newRow("bold") << "<b>bold</b>" << "bold";
QTest::newRow("italic") << "<b>italic</b>" << "italic";
+ QTest::newRow("strong") << "<strong>strong</strong>" << "strong";
QTest::newRow("missing >") << "<b>text</b" << "text";
QTest::newRow("missing b>") << "<b>text</" << "text";
QTest::newRow("missing /b>") << "<b>text<" << "text";