diff options
Diffstat (limited to 'src/UserSettingsPage.h')
-rw-r--r-- | src/UserSettingsPage.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h index dd1e26d9..af73202e 100644 --- a/src/UserSettingsPage.h +++ b/src/UserSettingsPage.h @@ -91,9 +91,12 @@ class UserSettings : public QObject Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged) Q_PROPERTY(QString homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged) -public: UserSettings(); +public: + static QSharedPointer<UserSettings> instance(); + static void initialize(std::optional<QString> profile); + enum class Presence { AutomaticPresence, @@ -104,7 +107,7 @@ public: Q_ENUM(Presence) void save(); - void load(); + void load(std::optional<QString> profile); void applyTheme(); void setTheme(QString theme); void setMessageHoverHighlight(bool state); @@ -252,6 +255,8 @@ private: QString accessToken_; QString deviceId_; QString homeserver_; + + static QSharedPointer<UserSettings> instance_; }; class HorizontalLine : public QFrame |