diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-11-11 13:43:08 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-11-19 15:59:41 +0100 |
commit | cde562cf6d65a3ad64fa6afd6014be74febdf912 (patch) | |
tree | 318daaf91b4cedd9a85e4fc8060c064a0e8ce250 /tests/auto | |
parent | 7490937609dc6a46ab33dc7195ab78e02bd50e1d (diff) |
Properly fix QFontDatabase test on Freetype
Amends 4dd5020fbdfdd34f1e4ec54521217e472942a4b4. I messed up the fix for
the XFAIL condition, since the font engine type we get from a normal QFont
will be QFontEngine::Multi regardless of whether the actual font engines
are Freetype or not. Use NoFontMerging to avoid this.
Pick-to: 6.2
Task-number: QTBUG-97995
Change-Id: I2298c997e6826e667dbb8e3d004821f296625ef7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index 2ce98be935..6b6ad201bf 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -431,7 +431,9 @@ void tst_QFontDatabase::condensedFontMatching() tfcByStyleName.setStyleName("Condensed"); #ifdef Q_OS_WIN - QFontPrivate *font_d = QFontPrivate::get(tfcByStretch); + QFont f; + f.setStyleStrategy(QFont::NoFontMerging); + QFontPrivate *font_d = QFontPrivate::get(f); if (font_d->engineForScript(QChar::Script_Common)->type() != QFontEngine::Freetype) QEXPECT_FAIL("","No matching of sub-family by stretch on Windows", Continue); #endif |