diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
commit | 388fe97f2a54089544dff0ed3af6ca70bf604716 (patch) | |
tree | 163b47974c625849726804337bd667c942dfbc77 /tests/auto/gui | |
parent | a0c4b6f34546bdd22167a76a0540d37e9a37c0cf (diff) | |
parent | 591116490cf313808e8ba05ddd066656a1d1a566 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/BLACKLIST | 3 | ||||
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qfontdatabase/BLACKLIST b/tests/auto/gui/text/qfontdatabase/BLACKLIST new file mode 100644 index 0000000000..7f479e4b0e --- /dev/null +++ b/tests/auto/gui/text/qfontdatabase/BLACKLIST @@ -0,0 +1,3 @@ +[systemFixedFont] # QTBUG-54623 +winrt +b2qt diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index 8d197dc616..2b69801b59 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() { |