diff -r 56cd8111b7f7 -r 41300fa6a67c tests/auto/qfontcombobox/tst_qfontcombobox.cpp --- a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -144,16 +144,18 @@ QFont oldCurrentFont = box.currentFont(); box.setCurrentFont(currentFont); - QCOMPARE(box.currentFont(), currentFont); + QRegExp foundry(" \\[.*\\]"); + if (!box.currentFont().family().contains(foundry)) { + QCOMPARE(box.currentFont(), currentFont); + } QString boxFontFamily = QFontInfo(box.currentFont()).family(); - QRegExp foundry(" \\[.*\\]"); if (!currentFont.family().contains(foundry)) boxFontFamily.remove(foundry); QCOMPARE(boxFontFamily, currentFont.family()); if (oldCurrentFont != box.currentFont()) { //the signal may be emit twice if there is a foundry into brackets - QVERIFY(spy0.count() >= 1); + QCOMPARE(spy0.count(),1); } } @@ -286,6 +288,10 @@ if (box.model()->rowCount() > 2) { QTest::keyPress(&box, Qt::Key_Down); QCOMPARE(spy0.count(), 1); + + QFont f( "Sans Serif" ); + box.setCurrentFont(f); + QCOMPARE(spy0.count(), 2); } else qWarning("Not enough fonts installed on test system. Consider adding some"); }