diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-11 16:30:54 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-11 16:30:54 (GMT) |
commit | 2d63f8fe5b77747014e1c5807c9d457611bd9304 (patch) | |
tree | 12f2a2efcb619e58b0089e59d3efeff50326e720 /tests/auto/qfontcombobox | |
parent | 46a3e518b3070cf7cb4cbbb2cb58254454cf169d (diff) | |
download | Qt-2d63f8fe5b77747014e1c5807c9d457611bd9304.zip Qt-2d63f8fe5b77747014e1c5807c9d457611bd9304.tar.gz Qt-2d63f8fe5b77747014e1c5807c9d457611bd9304.tar.bz2 |
Fixed: QFontComboBox emits the currentFontChanged() signal twice
Task-number: QTBUG-2438
Reviewed-by: Thierry
Diffstat (limited to 'tests/auto/qfontcombobox')
-rw-r--r-- | tests/auto/qfontcombobox/tst_qfontcombobox.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp index 7045c19..b974ecab 100644 --- a/tests/auto/qfontcombobox/tst_qfontcombobox.cpp +++ b/tests/auto/qfontcombobox/tst_qfontcombobox.cpp @@ -153,7 +153,7 @@ void tst_QFontComboBox::currentFont() 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 +286,10 @@ void tst_QFontComboBox::currentFontChanged() 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"); } |