From 9506823a68cda1214ecf305e78f4f27cc764afa6 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Fri, 19 Aug 2011 13:13:26 +1000 Subject: 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 Reviewed-by: Michael Brasser --- .../declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(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); -- cgit v1.2.3