From 55e006bdf1019e192d5a2af5fa348c3759bfb64a Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Sat, 11 Jan 2025 16:45:29 -0500 Subject: [PATCH] Fix singleton access conditions --- app/src/Misc/CommonFonts.h | 3 +-- app/src/Misc/ThemeManager.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/Misc/CommonFonts.h b/app/src/Misc/CommonFonts.h index 5534c564..486b811b 100644 --- a/app/src/Misc/CommonFonts.h +++ b/app/src/Misc/CommonFonts.h @@ -50,13 +50,12 @@ signals: private: explicit CommonFonts(); - -public: CommonFonts(CommonFonts &&) = delete; CommonFonts(const CommonFonts &) = delete; CommonFonts &operator=(CommonFonts &&) = delete; CommonFonts &operator=(const CommonFonts &) = delete; +public: static CommonFonts &instance(); [[nodiscard]] const QFont &uiFont() const; diff --git a/app/src/Misc/ThemeManager.h b/app/src/Misc/ThemeManager.h index 4e3cb67d..21d80f5e 100644 --- a/app/src/Misc/ThemeManager.h +++ b/app/src/Misc/ThemeManager.h @@ -114,14 +114,14 @@ signals: private: explicit ThemeManager(); - -public: - static ThemeManager &instance(); ThemeManager(ThemeManager &&) = delete; ThemeManager(const ThemeManager &) = delete; ThemeManager &operator=(ThemeManager &&) = delete; ThemeManager &operator=(const ThemeManager &) = delete; +public: + static ThemeManager &instance(); + [[nodiscard]] int theme() const; [[nodiscard]] const QString &themeName() const; [[nodiscard]] const QJsonObject &colors() const;