From 76068d0114157c6b59523f3fb032cd8de64e9a63 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 6 Aug 2020 08:47:37 +0200 Subject: Make QFontDatabase member functions static QFontDatabase is a singleton and all instances would share a single, mutex-protected global data pointer. But some functions were implemented as non-static functions. This caused a lot of code on the form QFontDatabase().families(...) since there was no static access. Other functions were implemented as static. To consolidate, we make all functions static. This should be source-compatible, but not binary compatible. [ChangeLog][QtGui][Fonts] Some functions in QFontDatabase were in principle static, but previously not implemented as such. All member functions have now been made static, so that constructing objects of QFontDatabase is no longer necessary to access certain functionality. Fixes: QTBUG-83284 Change-Id: Ifd8c15016281c71f631b53387402c942cd9c43f6 Reviewed-by: Konstantin Ritt --- tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp') diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp index f5358ceb93..628af91674 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp +++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp @@ -197,7 +197,7 @@ void tst_QFontDialog::task256466_wrongStyle() styleList->currentIndex().data().toString(), expectedSize); QCOMPARE(current.family(), expected.family()); QCOMPARE(current.style(), expected.style()); - if (expectedSize == 0 && !QFontDatabase().isScalable(current.family(), current.styleName())) + if (expectedSize == 0 && !QFontDatabase::isScalable(current.family(), current.styleName())) QEXPECT_FAIL("", "QTBUG-53299: Smooth sizes for unscalable font contains unsupported size", Continue); QCOMPARE(current.pointSizeF(), expected.pointSizeF()); } -- cgit v1.2.3