diff options
author | Chris Adams <christopher.adams@nokia.com> | 2011-08-19 13:13:26 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-19 06:18:52 +0200 |
commit | 9506823a68cda1214ecf305e78f4f27cc764afa6 (patch) | |
tree | 911c6853a86c5646cca35bce63c5146ce109b613 /tests/auto/declarative/qdeclarativevaluetypes | |
parent | e636770970e979d4111ca90eca926c5eea2e7ce0 (diff) |
Fix unit test failure
Previously had hardcoded tostring comparison value for QFont, but on
some platforms the default styleHint may be different. This commit
ensures that the comparison value is generated properly rather than
hardcoded.
Task-number: QTBUG-21003
Change-Id: I49229863b10bf5fb96248b9334b66d7b1ef46676
Reviewed-on: http://codereview.qt.nokia.com/3237
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativevaluetypes')
-rw-r--r-- | tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp index 89d0e7e357..3ccd5cb341 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp +++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp @@ -794,7 +794,7 @@ void tst_qdeclarativevaluetypes::font() MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); - QString tostring = QLatin1String("QFont(Arial,29,-1,0,63,1,1,1,0,0)"); + QString tostring = QLatin1String("QFont(") + object->font().toString() + QLatin1Char(')'); QCOMPARE(object->property("tostring").toString(), tostring); QCOMPARE(object->property("equalsString").toBool(), true); QCOMPARE(object->property("equalsColor").toBool(), false); |