diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-07-09 10:14:38 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-07-09 10:15:40 (GMT) |
commit | def00d15449551cd2e98b1f3f5b4199ad8be92c2 (patch) | |
tree | d26ca91c3f74283ef8a6a3602d7a5518ca9c6b11 /tests/auto/qfontdialog | |
parent | 3201ba131c9a94e938c7da09ee4323f60334ad9b (diff) | |
download | Qt-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
Diffstat (limited to 'tests/auto/qfontdialog')
-rw-r--r-- | tests/auto/qfontdialog/tst_qfontdialog.cpp | 8 |
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()); } } |