summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtexthtmlparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r--src/gui/text/qtexthtmlparser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index 86a1f68..b1f1b75 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -1525,6 +1525,8 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes)
node->charFormat.setFontFamily(value);
} else if (key == QLatin1String("color")) {
QColor c; c.setNamedColor(value);
+ if (!c.isValid())
+ qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData());
node->charFormat.setForeground(c);
}
break;
@@ -1570,6 +1572,8 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes)
case Html_body:
if (key == QLatin1String("bgcolor")) {
QColor c; c.setNamedColor(value);
+ if (!c.isValid())
+ qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData());
node->charFormat.setBackground(c);
} else if (key == QLatin1String("background")) {
node->applyBackgroundImage(value, resourceProvider);
@@ -1581,6 +1585,8 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes)
setWidthAttribute(&node->width, value);
} else if (key == QLatin1String("bgcolor")) {
QColor c; c.setNamedColor(value);
+ if (!c.isValid())
+ qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData());
node->charFormat.setBackground(c);
} else if (key == QLatin1String("background")) {
node->applyBackgroundImage(value, resourceProvider);
@@ -1597,6 +1603,8 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes)
setFloatAttribute(&node->tableBorder, value);
} else if (key == QLatin1String("bgcolor")) {
QColor c; c.setNamedColor(value);
+ if (!c.isValid())
+ qWarning("QTextHtmlParser::applyAttributes: Unknown color name '%s'",value.toLatin1().constData());
node->charFormat.setBackground(c);
} else if (key == QLatin1String("background")) {
node->applyBackgroundImage(value, resourceProvider);