From fc3ac31891d254d634fc9a776a2ebeb6d1c3cc77 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 14 Oct 2021 10:17:39 -0700 Subject: [PATCH] QFontDatabase: suppress warning about its constructor being deprecated qmetatype.h:2263:76: warning: 'QFontDatabase' is deprecated: Call the static functions instead [-Wdeprecated-declarations] ... moc_qfontdatabase.cpp:159:1: note: in instantiation of variable template specialization 'qt_incomplete_metaTypeArray>>' requested here qfontdatabase.h:113:7: note: 'QFontDatabase' has been explicitly marked deprecated here Change-Id: Iea05060bc2c046928536fffd16adf537be122db2 Reviewed-by: Volker Hilsheimer --- src/gui/text/qfontdatabase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h index 79ace4e35ba..d0d2cfa6293 100644 --- a/src/gui/text/qfontdatabase.h +++ b/src/gui/text/qfontdatabase.h @@ -109,7 +109,7 @@ public: static QList standardSizes(); -#if QT_DEPRECATED_SINCE(6, 0) +#if QT_DEPRECATED_SINCE(6, 0) && !defined(QT_BUILD_GUI_LIB) QT_DEPRECATED_VERSION_X_6_0("Call the static functions instead") explicit QFontDatabase() = default; #else QFontDatabase() = delete;