summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qcssparser
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals@canonical.com>2013-04-25 10:59:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-26 09:59:04 +0200
commit9b021a1fbd0b974a452a6e18a8c0b4b97cbf8edb (patch)
tree8cbb52f561e6d3a64bc46a3be3d0fbe259d1600c /tests/auto/gui/text/qcssparser
parent08585f02dc0eb8dc5567f47c55915540c0a34e01 (diff)
Make QColor understand #AARRGGBB
This way I can have in my QtQuick something like Text { text: "<font color='#ff0000'>H</font> <font color='#99ff0000'>H</font>" } and it works properly QtQuick already supports #AARRGGBB for color: properties so I've decided to go the notation Once this is merged we can remove the extra code in QQuickColorProvider::QColorFromString I've also added some tests for the hex -> QColor conversion that where non existent Change-Id: I1dd4a2ec113293aec26968329b2e4930df6fdcb7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'tests/auto/gui/text/qcssparser')
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index ca6c42c9bd..86e282fad2 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -344,8 +344,6 @@ void tst_QCssParser::term_data()
val.variant = QVariant(QColor("#ffbb00"));
QTest::newRow("hexcolor2") << true << "#fb0" << val;
- QTest::newRow("hexcolor_failure") << false << "#cafebabe" << val;
-
val.type = QCss::Value::Uri;
val.variant = QString("www.kde.org");
QTest::newRow("uri1") << true << "url(\"www.kde.org\")" << val;
@@ -367,9 +365,6 @@ void tst_QCssParser::term()
QFETCH(QString, css);
QFETCH(QCss::Value, expectedValue);
- if (strcmp(QTest::currentDataTag(), "hexcolor_failure") == 0)
- QTest::ignoreMessage(QtWarningMsg, "QCssParser::parseHexColor: Unknown color name '#cafebabe'");
-
QCss::Parser parser(css);
QCss::Value val;
QVERIFY(parser.testTerm());