diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-11 09:29:17 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-11 09:29:17 +0200 |
commit | 4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (patch) | |
tree | cc68622c9b85992d99a8373ab55471ee821a4ebf /tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp | |
parent | ab28ff2207e8f33754c79793089dbf943d67736d (diff) | |
parent | ebb49c66aaf22ed55d62ff7bc3690fce00b7d8ba (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Change-Id: I569a2246c9e8d70430e8c5405b9f3df2218078ee
Diffstat (limited to 'tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp index bd3ea5686a..75f595e959 100644 --- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp +++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp @@ -261,15 +261,18 @@ void tst_QFontComboBox::writingSystem() // protected void currentFontChanged(QFont const& f) void tst_QFontComboBox::currentFontChanged() { - SubQFontComboBox box; - QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont))); + // The absence of this file does not affect the test results + QFontDatabase::addApplicationFont("ArianaVioleta-dz2K.ttf"); + + SubQFontComboBox *box = new SubQFontComboBox; + QSignalSpy spy0(box, SIGNAL(currentFontChanged(QFont))); - if (box.model()->rowCount() > 2) { - QTest::keyPress(&box, Qt::Key_Down); + if (box->model()->rowCount() > 2) { + QTest::keyPress(box, Qt::Key_Down); QCOMPARE(spy0.count(), 1); QFont f( "Sans Serif" ); - box.setCurrentFont(f); + box->setCurrentFont(f); QCOMPARE(spy0.count(), 2); } else qWarning("Not enough fonts installed on test system. Consider adding some"); |