From 2a70677b64e61d7b136e4fa3725be53258327b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Wed, 23 Sep 2015 14:26:27 +0200 Subject: Implement support for 'none' value for list-style CSS property 'none' is a valid value specified in CSS standard. In combination with '-qt-list-indent: 0' it allows for using lists in Qt for better structuring text Change-Id: I1dd324a3ea81b26e21a9d4d9f93ef9b5edcf3e93 Task-number: QTBUG-6501 Reviewed-by: Lars Knoll --- src/gui/text/qtexthtmlparser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/text/qtexthtmlparser.cpp') diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index f8f41bb53d..a09ed2c040 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1140,6 +1140,7 @@ void QTextHtmlParserNode::setListStyle(const QVector &cssValues) for (int i = 0; i < cssValues.count(); ++i) { if (cssValues.at(i).type == QCss::Value::KnownIdentifier) { switch (static_cast(cssValues.at(i).variant.toInt())) { + case QCss::Value_None: hasOwnListStyle = true; listStyle = QTextListFormat::ListStyleUndefined; break; case QCss::Value_Disc: hasOwnListStyle = true; listStyle = QTextListFormat::ListDisc; break; case QCss::Value_Square: hasOwnListStyle = true; listStyle = QTextListFormat::ListSquare; break; case QCss::Value_Circle: hasOwnListStyle = true; listStyle = QTextListFormat::ListCircle; break; @@ -1495,6 +1496,8 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes) node->listStyle = QTextListFormat::ListDisc; else if (value == QLatin1String("circle")) node->listStyle = QTextListFormat::ListCircle; + else if (value == QLatin1String("none")) + node->listStyle = QTextListFormat::ListStyleUndefined; } } break; -- cgit v1.2.3