wip changes
This commit is contained in:
@@ -4,10 +4,13 @@
|
||||
#include <QCryptographicHash>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
#include <cassert>
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
||||
PathManager *PathManager::instance = nullptr;
|
||||
|
||||
PathManager::PathManager(int argc, char **argv)
|
||||
{
|
||||
// hash of app path
|
||||
@@ -68,6 +71,20 @@ PathManager::PathManager(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
void PathManager::initInstance(int argc, char **argv)
|
||||
{
|
||||
assert(!instance);
|
||||
|
||||
instance = new PathManager(argc, argv);
|
||||
}
|
||||
|
||||
PathManager *PathManager::getInstance()
|
||||
{
|
||||
assert(instance);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool PathManager::createFolder(const QString &folderPath)
|
||||
{
|
||||
return QDir().mkpath(folderPath);
|
||||
|
||||
Reference in New Issue
Block a user