diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2009-11-10 03:01:07 (GMT) |
---|---|---|
committer | Kurt Korbatits <kurt.korbatits@nokia.com> | 2009-11-10 03:01:07 (GMT) |
commit | 8df98549a4d84b5877e50318140c2041e17632fb (patch) | |
tree | 0c55d5ef4d8380ec45c6457a40b033dc45cbd579 /src/gui/text/qcssparser.cpp | |
parent | f55c317e377aaf0b3e24904e88dc1c4a6e15a20a (diff) | |
parent | 9a6de1fa0db0da8c4fa5eb904ef6d78cc619e332 (diff) | |
download | Qt-8df98549a4d84b5877e50318140c2041e17632fb.zip Qt-8df98549a4d84b5877e50318140c2041e17632fb.tar.gz Qt-8df98549a4d84b5877e50318140c2041e17632fb.tar.bz2 |
Merge branch '4.6' of ../qt into 4.6
Diffstat (limited to 'src/gui/text/qcssparser.cpp')
-rw-r--r-- | src/gui/text/qcssparser.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index 6db86bd..93b9fc6 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -1129,19 +1129,22 @@ static bool setFontWeightFromValue(const Value &value, QFont *font) static bool setFontFamilyFromValues(const QVector<Value> &values, QFont *font, int start = 0) { QString family; + bool shouldAddSpace = false; for (int i = start; i < values.count(); ++i) { const Value &v = values.at(i); if (v.type == Value::TermOperatorComma) { family += QLatin1Char(','); + shouldAddSpace = false; continue; } const QString str = v.variant.toString(); if (str.isEmpty()) break; + if (shouldAddSpace) + family += QLatin1Char(' '); family += str; - family += QLatin1Char(' '); + shouldAddSpace = true; } - family = family.simplified(); if (family.isEmpty()) return false; font->setFamily(family); |