aboutsummaryrefslogtreecommitdiff
path: root/src/profilemanager.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-07 13:11:58 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-07 13:11:58 +0200
commit4739f509d9d5ebaef71a51cece8f75b6a7e4b3dc (patch)
treee3f89c1db2aaaa605f0cbd4d752479a611fb5aac /src/profilemanager.h
parentSome cppcheck fixes (diff)
downloadsmolbote-4739f509d9d5ebaef71a51cece8f75b6a7e4b3dc.tar.xz
Move ProfileManager to libweb
Diffstat (limited to 'src/profilemanager.h')
-rw-r--r--src/profilemanager.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/profilemanager.h b/src/profilemanager.h
deleted file mode 100644
index 5ece510..0000000
--- a/src/profilemanager.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This file is part of smolbote. It's copyrighted by the contributors recorded
- * in the version control history of the file, available from its original
- * location: https://neueland.iserlohn-fortress.net/smolbote.hg
- *
- * SPDX-License-Identifier: GPL-3.0
- */
-
-#ifndef SMOLBOTE_PROFILEMANAGER_H
-#define SMOLBOTE_PROFILEMANAGER_H
-
-#include <QObject>
-#include <QMap>
-#include <webprofile.h>
-
-typedef QMapIterator<QString, WebProfile *> ProfileIterator;
-
-#define profileManager ProfileManager::instance()
-
-class WebProfile;
-class ProfileManager : public QObject
-{
- Q_OBJECT
-public:
-
- struct Profile
- {
- QString id;
- WebProfile *profile = nullptr;
- };
-
- explicit ProfileManager(const QHash<QString, QString> &profileSection, QObject *parent = nullptr);
-
- static void setInstance(ProfileManager *instance);
- static ProfileManager *instance();
-
- WebProfile *loadProfile(const QString &path);
-
- const QString id(WebProfile *profile);
- WebProfile *profile(const QString &id);
- const QMap<QString, WebProfile *>& profileList();
-
-private:
- QMap<QString, WebProfile *> profiles;
-
- static ProfileManager *s_instance;
- const QHash<QString, QString> defaults;
-};
-
-#endif // SMOLBOTE_PROFILEMANAGER_H