aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-02-20 15:22:37 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-21 02:25:14 +0100
commite060245ebe70f792f551fd8474231400a3fd4728 (patch)
tree667ec44a9e90ed3afbb7dd743784a7e9e1ee8375 /tests/auto/qtquick2
parented20c5e6802a13e4faf6f7b09e0b30d01846ca07 (diff)
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 <yann.bodson@nokia.com>
Diffstat (limited to 'tests/auto/qtquick2')
-rw-r--r--tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp9
1 files changed, 4 insertions, 5 deletions
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<QQuickText*>(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<QQuickText*>(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<QObject> object(textComponent.create());
QQuickText *textObject = qobject_cast<QQuickText*>(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<QObject> object(textComponent.create());
QQuickText *textObject = qobject_cast<QQuickText*>(object.data());
- QSignalSpy spy(textObject, SIGNAL(styleColorChanged(QColor)));
+ QSignalSpy spy(textObject, SIGNAL(styleColorChanged()));
QCOMPARE(textObject->styleColor(), testColor);
textObject->setStyleColor(testColor);