mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-03 00:25:25 +08:00
Use more elegant singleton and fix spell bug.
This commit is contained in:
@ -13,7 +13,7 @@ class AppInfo : public QObject
|
||||
private:
|
||||
explicit AppInfo(QObject *parent = nullptr);
|
||||
public:
|
||||
SINGLETONG(AppInfo)
|
||||
SINGLETON(AppInfo)
|
||||
};
|
||||
|
||||
#endif // APPINFO_H
|
||||
|
@ -16,7 +16,7 @@ class SettingsHelper : public QObject
|
||||
private:
|
||||
explicit SettingsHelper(QObject* parent = nullptr);
|
||||
public:
|
||||
SINGLETONG(SettingsHelper)
|
||||
SINGLETON(SettingsHelper)
|
||||
~SettingsHelper() override;
|
||||
void init(char *argv[]);
|
||||
Q_INVOKABLE void saveDarkMode(int darkModel){save("darkMode",darkModel);}
|
||||
|
@ -34,7 +34,7 @@ T* Singleton<T>::getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
#define SINGLETONG(Class) \
|
||||
#define SINGLETON(Class) \
|
||||
private: \
|
||||
friend class Singleton<Class>; \
|
||||
friend struct QScopedPointerDeleter<Class>; \
|
||||
|
Reference in New Issue
Block a user