diff options
Diffstat (limited to 'tests/auto/qfontdialog/tst_qfontdialog.cpp')
-rw-r--r-- | tests/auto/qfontdialog/tst_qfontdialog.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qfontdialog/tst_qfontdialog.cpp b/tests/auto/qfontdialog/tst_qfontdialog.cpp index 1444ee0..cbdd440 100644 --- a/tests/auto/qfontdialog/tst_qfontdialog.cpp +++ b/tests/auto/qfontdialog/tst_qfontdialog.cpp @@ -156,7 +156,7 @@ void tst_QFontDialog::setFont() class FriendlyFontDialog : public QFontDialog { - friend tst_QFontDialog; + friend class tst_QFontDialog; Q_DECLARE_PRIVATE(QFontDialog); }; @@ -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()); } } |