diff options
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index bb15feabfa4..34c33132ac1 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1641,7 +1641,7 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes) node->charFormat.setFontFamilies(QStringList(value)); } } else if (key == QLatin1String("color")) { - QColor c; c.setNamedColor(value); + QColor c = QColor::fromString(value); if (!c.isValid()) qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData()); node->charFormat.setForeground(c); @@ -1698,7 +1698,7 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes) case Html_tr: case Html_body: if (key == QLatin1String("bgcolor")) { - QColor c; c.setNamedColor(value); + QColor c = QColor::fromString(value); if (!c.isValid()) qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData()); node->charFormat.setBackground(c); @@ -1711,7 +1711,7 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes) if (key == QLatin1String("width")) { setWidthAttribute(&node->width, value); } else if (key == QLatin1String("bgcolor")) { - QColor c; c.setNamedColor(value); + QColor c = QColor::fromString(value); if (!c.isValid()) qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData()); node->charFormat.setBackground(c); @@ -1729,12 +1729,12 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes) if (key == QLatin1String("border")) { setFloatAttribute(&node->tableBorder, value); } else if (key == QLatin1String("bgcolor")) { - QColor c; c.setNamedColor(value); + QColor c = QColor::fromString(value); if (!c.isValid()) qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData()); node->charFormat.setBackground(c); } else if (key == QLatin1String("bordercolor")) { - QColor c; c.setNamedColor(value); + QColor c = QColor::fromString(value); if (!c.isValid()) qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData()); node->borderBrush = c; |