fix: fix not thread-safe settings singleton.
fix not thread-safe way for fetching settings singleton. remove qApp from Settings' parent, use nullptr replace it and leak it anyway. because we may initialize it before initializing QApplication. in that time, qApp is nullptr.
This commit is contained in:
1 parent
1de1517a81
commit
fc3ef1cd7f
2 files changed
+11
-16
No files matched your search
+1
-3
@@ -51,9 +51,7 @@ public:
|
||||
void setHiDpiScaleFactorBehavior(Qt::HighDpiScaleFactorRoundingPolicy hidpi);
|
||||
|
||||
private:
|
||||
Settings();
|
||||
|
||||
static Settings *m_settings_instance;
|
||||
Settings(QObject *parent = nullptr);
|
||||
|
||||
QSettings *m_qsettings;
|
||||
|
||||
|
||||
Reference in new issue
Block a user