From 9abf7a9690163737d3e70b3b52d814135858d0d5 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 29 Sep 2018 14:56:39 +0200 Subject: ProfileManager: move initial profile loading to ProfileManager --- lib/web/profilemanager.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'lib/web/profilemanager.h') diff --git a/lib/web/profilemanager.h b/lib/web/profilemanager.h index 1cb5dd5..9cd2cbd 100644 --- a/lib/web/profilemanager.h +++ b/lib/web/profilemanager.h @@ -20,17 +20,12 @@ #include #include -#define profileManager ProfileManager::instance() - class WebProfile; class ProfileManager : public QObject { Q_OBJECT public: - explicit ProfileManager(const QHash &profileSection, QObject *parent = nullptr); - - static void setInstance(ProfileManager *instance); - static ProfileManager *instance(); + explicit ProfileManager(const QHash &profileSection, const QString &defaultId, QObject *parent = nullptr); WebProfile *loadProfile(const QString &path); void deleteProfile(const QString &id); @@ -40,7 +35,6 @@ public: const QStringList idList() const; const QString id(const WebProfile *profile) const; WebProfile *profile(const QString &id) const; - const QString configurationPath(const QString &id) const; private: struct ProfileData { @@ -68,8 +62,6 @@ private: }; std::map> m_profiles; - - static ProfileManager *s_instance; const QHash defaults; }; -- cgit v1.2.1