From e060245ebe70f792f551fd8474231400a3fd4728 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 20 Feb 2012 15:22:37 +1000 Subject: Reduce the size of QTextPrivate. Remove some unnecessary members, store colors as QRgb values instead of QColor, and reorder members to minimise alignment padding. Change-Id: Id3958429008c97a5714734a529250fe881e2161b Reviewed-by: Yann Bodson --- tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp b/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp index cbe3d30cbb..d1c0f765d0 100644 --- a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp @@ -905,7 +905,7 @@ void tst_qquicktext::color() QQuickText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->color(), QColor(colorStrings.at(i))); - QCOMPARE(textObject->styleColor(), QColor()); + QCOMPARE(textObject->styleColor(), QColor("black")); QCOMPARE(textObject->linkColor(), QColor("blue")); delete textObject; @@ -933,8 +933,7 @@ void tst_qquicktext::color() textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QQuickText *textObject = qobject_cast(textComponent.create()); - QCOMPARE(textObject->styleColor(), QColor()); - // default color to black? + QCOMPARE(textObject->styleColor(), QColor("black")); QCOMPARE(textObject->color(), QColor("black")); QCOMPARE(textObject->linkColor(), QColor(colorStrings.at(i))); @@ -984,7 +983,7 @@ void tst_qquicktext::color() QScopedPointer object(textComponent.create()); QQuickText *textObject = qobject_cast(object.data()); - QSignalSpy spy(textObject, SIGNAL(colorChanged(QColor))); + QSignalSpy spy(textObject, SIGNAL(colorChanged())); QCOMPARE(textObject->color(), testColor); textObject->setColor(testColor); @@ -1005,7 +1004,7 @@ void tst_qquicktext::color() QScopedPointer object(textComponent.create()); QQuickText *textObject = qobject_cast(object.data()); - QSignalSpy spy(textObject, SIGNAL(styleColorChanged(QColor))); + QSignalSpy spy(textObject, SIGNAL(styleColorChanged())); QCOMPARE(textObject->styleColor(), testColor); textObject->setStyleColor(testColor); -- cgit v1.2.3