From b361d6151c31bd67be757706dc10bcefafb49cf2 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 22 Sep 2023 04:48:27 +0400 Subject: [PATCH] Fix unused warnings with DESKTOP_APP_USE_PACKAGED_FONTS --- ui/style/style_core_font.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index 8e067ca..a10d43a 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -71,6 +71,7 @@ bool ValidateFont(const QString &familyName, int flags = 0) { return true; } +#ifndef LIB_UI_USE_PACKAGED_FONTS bool LoadCustomFont(const QString &filePath, const QString &familyName, int flags = 0) { auto regularId = QFontDatabase::addApplicationFont(filePath); if (regularId < 0) { @@ -94,6 +95,7 @@ bool LoadCustomFont(const QString &filePath, const QString &familyName, int flag return ValidateFont(familyName, flags); } +#endif // !LIB_UI_USE_PACKAGED_FONTS [[nodiscard]] QString SystemMonospaceFont() { const auto type = QFontDatabase::FixedFont; @@ -160,7 +162,6 @@ QString FontTypePersianFallback[FontTypesCount] = { "DAVazirMedium", "DAVazirMedium", }; -#endif // !LIB_UI_USE_PACKAGED_FONTS int32 FontTypeFlags[FontTypesCount] = { 0, FontItalic, @@ -169,6 +170,7 @@ int32 FontTypeFlags[FontTypesCount] = { FontSemibold, FontSemibold | FontItalic, }; +#endif // !LIB_UI_USE_PACKAGED_FONTS bool Started = false; QString Overrides[FontTypesCount];