diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-05-09 01:00:49 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-09 13:06:11 +0000 |
commit | e56d3b03ed92743f33eb7ca1a5aa61dbdedaf19b (patch) | |
tree | c29a80a940cca1281014732aff4237c915f32dc4 /tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp | |
parent | 2a79af6b5c67eba6f967c7443bf73bbe11206a62 (diff) | |
parent | 9444416a46ee0e6bb0d9d9be9a4883b388644c59 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/corelib/tools/qlocale_data_p.h
(Regenerated by running the scripts in util/local_database/)
src/gui/opengl/qopengltextureuploader.cpp
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
Diffstat (limited to 'tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp')
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index 68664cdd2f..064e37f73c 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -35,6 +35,8 @@ #include <private/qrawfont_p.h> #include <qpa/qplatformfontdatabase.h> +Q_LOGGING_CATEGORY(lcTests, "qt.text.tests") + class tst_QFontDatabase : public QObject { Q_OBJECT @@ -49,6 +51,7 @@ private slots: void fixedPitch_data(); void fixedPitch(); + void systemFixedFont(); #ifdef Q_OS_MAC void trickyFonts_data(); @@ -156,6 +159,16 @@ void tst_QFontDatabase::fixedPitch() QCOMPARE(fi.fixedPitch(), fixedPitch); } +void tst_QFontDatabase::systemFixedFont() // QTBUG-54623 +{ + QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont); + QFontInfo fontInfo(font); + bool fdbSaysFixed = QFontDatabase().isFixedPitch(fontInfo.family(), fontInfo.styleName()); + qCDebug(lcTests) << "system fixed font is" << font << "really fixed?" << fdbSaysFixed << fontInfo.fixedPitch(); + QVERIFY(fdbSaysFixed); + QVERIFY(fontInfo.fixedPitch()); +} + #ifdef Q_OS_MAC void tst_QFontDatabase::trickyFonts_data() { |