mirror-chatterino2/src/singletons/Settings.cpp

30 lines
531 B
C++
Raw Normal View History

2018-06-28 19:46:45 +02:00
#include "singletons/Settings.hpp"
2018-06-26 14:09:39 +02:00
#include "Application.hpp"
#include "debug/Log.hpp"
2018-06-28 19:46:45 +02:00
#include "singletons/Paths.hpp"
#include "singletons/Resources.hpp"
2018-06-26 14:09:39 +02:00
#include "singletons/WindowManager.hpp"
2017-04-12 17:46:44 +02:00
2017-04-14 17:52:22 +02:00
namespace chatterino {
2017-04-12 17:46:44 +02:00
2018-08-02 14:23:27 +02:00
Settings *Settings::instance = nullptr;
2018-11-25 15:02:48 +01:00
Settings::Settings(const QString &settingsDirectory)
: ABSettings(settingsDirectory)
{
2018-08-02 14:23:27 +02:00
instance = this;
2017-04-12 17:46:44 +02:00
}
2018-08-02 14:23:27 +02:00
Settings &Settings::getInstance()
{
2018-08-02 14:23:27 +02:00
return *instance;
}
2018-06-28 19:51:07 +02:00
Settings *getSettings()
2018-01-17 14:14:31 +01:00
{
2018-06-28 19:51:07 +02:00
return &Settings::getInstance();
2018-01-17 14:14:31 +01:00
}
2018-01-23 21:33:49 +01:00
2017-04-14 17:52:22 +02:00
} // namespace chatterino