KShare/settings.cpp
ArsenArsen 1d059cc08a Finalize recording.
Yet to fix GIFs and implement WebP/WebM/MP4
I wouldn't mind help
2017-06-06 13:38:15 +02:00

18 lines
494 B
C++

#include "settings.hpp"
#include <QMutex>
#include <QStandardPaths>
QMutex *lock = new QMutex;
QSettings &settings::settings() {
QMutexLocker l(lock);
static QDir configDir(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation));
if (configDir.dirName() != "KShare") {
configDir.mkdir("KShare");
configDir.cd("KShare");
}
static QSettings settings(configDir.absoluteFilePath("settings.ini"), QSettings::IniFormat);
return settings;
}