summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-11-10 08:32:01 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-11-10 15:37:03 +0100
commit518790af79df339143820cd9d34a74c00db1ed7e (patch)
tree4bb82a32020607981ac3bb8dd574eb2375d1904f /tests/auto/gui/text
parent9991ca91633d77a86b31b594897aa871b6151888 (diff)
Fix tst_qfontdatabase on Windows with Freetype
Since e05e3c776256d35798f451f31cd71e809786ed78, the advance test in tst_QFontDatabase::condensedFontMatching() passes with the bundled freetype engine, so the XFAIL causes a failure when running with this configuration. Pick-to: 6.2 Change-Id: Ie6fbccfa0d9c79654563e9e3f19694f252e32fc6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/gui/text')
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index dd3bbde871..2ce98be935 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -34,6 +34,8 @@
#include <qfontmetrics.h>
#include <qtextlayout.h>
#include <private/qrawfont_p.h>
+#include <private/qfont_p.h>
+#include <private/qfontengine_p.h>
#include <qpa/qplatformfontdatabase.h>
Q_LOGGING_CATEGORY(lcTests, "qt.text.tests")
@@ -429,7 +431,9 @@ void tst_QFontDatabase::condensedFontMatching()
tfcByStyleName.setStyleName("Condensed");
#ifdef Q_OS_WIN
- QEXPECT_FAIL("","No matching of sub-family by stretch on Windows", Continue);
+ QFontPrivate *font_d = QFontPrivate::get(tfcByStretch);
+ if (font_d->engineForScript(QChar::Script_Common)->type() != QFontEngine::Freetype)
+ QEXPECT_FAIL("","No matching of sub-family by stretch on Windows", Continue);
#endif
#ifdef Q_OS_ANDROID