summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-26 00:37:14 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-01-26 00:37:14 +0000
commit398a7e736cb42ac42f0887989585b1121b7e6e62 (patch)
tree916854b706b9b057fa1483f76dd48998a8aa28a0 /src/gui/text
parent4d3a35f63788fa5ff7a11a5bb7bd6176bd2ac70e (diff)
parent318b58562ae89453fb98e8145cd0440e14ba60b0 (diff)
Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfont.cpp2
-rw-r--r--src/gui/text/qtexthtmlparser_p.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 3b24039ea6..7f3ed3adaa 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -2077,6 +2077,8 @@ bool QFont::fromString(const QString &descrip)
setFixedPitch(l[8].toInt());
if (count == 11)
d->request.styleName = l[10].toString();
+ else
+ d->request.styleName.clear();
}
if (count >= 9 && !d->request.fixedPitch) // assume 'false' fixedPitch equals default
diff --git a/src/gui/text/qtexthtmlparser_p.h b/src/gui/text/qtexthtmlparser_p.h
index e93d46a59f..77bfa685c0 100644
--- a/src/gui/text/qtexthtmlparser_p.h
+++ b/src/gui/text/qtexthtmlparser_p.h
@@ -243,7 +243,7 @@ struct QTextHtmlParserNode {
void parseStyleAttribute(const QString &value, const QTextDocument *resourceProvider);
-#ifndef QT_NO_CSSPARSER
+#if QT_CONFIG(cssparser)
void applyCssDeclarations(const QVector<QCss::Declaration> &declarations, const QTextDocument *resourceProvider);
void setListStyle(const QVector<QCss::Value> &cssValues);
@@ -317,7 +317,7 @@ protected:
bool nodeIsChildOf(int i, QTextHTMLElements id) const;
-#ifndef QT_NO_CSSPARSER
+#if QT_CONFIG(cssparser)
QVector<QCss::Declaration> declarationsForNode(int node) const;
void resolveStyleSheetImports(const QCss::StyleSheet &sheet);
void importStyleSheet(const QString &href);
@@ -337,7 +337,9 @@ protected:
const QTextDocument *resourceProvider;
};
+#if QT_CONFIG(cssparser)
Q_DECLARE_TYPEINFO(QTextHtmlParser::ExternalStyleSheet, Q_MOVABLE_TYPE);
+#endif
QT_END_NAMESPACE