summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-09 10:14:38 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-09 10:15:40 (GMT)
commitdef00d15449551cd2e98b1f3f5b4199ad8be92c2 (patch)
treed26ca91c3f74283ef8a6a3602d7a5518ca9c6b11
parent3201ba131c9a94e938c7da09ee4323f60334ad9b (diff)
downloadQt-def00d15449551cd2e98b1f3f5b4199ad8be92c2.zip
Qt-def00d15449551cd2e98b1f3f5b4199ad8be92c2.tar.gz
Qt-def00d15449551cd2e98b1f3f5b4199ad8be92c2.tar.bz2
autotest fix
On the font from the font dialog, we can only test family, size and style
-rw-r--r--tests/auto/qfontdialog/tst_qfontdialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qfontdialog/tst_qfontdialog.cpp b/tests/auto/qfontdialog/tst_qfontdialog.cpp
index 5f1797b..cbdd440 100644
--- a/tests/auto/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/qfontdialog/tst_qfontdialog.cpp
@@ -170,8 +170,12 @@ void tst_QFontDialog::task256466_wrongStyle()
for (int i = 0; i < familyList->model()->rowCount(); ++i) {
QModelIndex currentFamily = familyList->model()->index(i, 0);
familyList->setCurrentIndex(currentFamily);
- QCOMPARE(dialog.currentFont(), fdb.font(currentFamily.data().toString(),
- styleList->currentIndex().data().toString(), sizeList->currentIndex().data().toInt()));
+ const QFont current = dialog.currentFont(),
+ expected = fdb.font(currentFamily.data().toString(),
+ styleList->currentIndex().data().toString(), sizeList->currentIndex().data().toInt());
+ QCOMPARE(current.family(), expected.family());
+ QCOMPARE(current.style(), expected.style());
+ QCOMPARE(current.pointSizeF(), expected.pointSizeF());
}
}