KShare/settings.cpp
ArsenArsen 37ce6f1eda Add clang-format; Make text and blur less annoying
I didn't read the clang-format documentation properly
2017-05-09 17:26:00 +02:00

14 lines
482 B
C++

#include "settings.hpp"
#include <QStandardPaths>
QSettings &settings::settings() {
static QDir configDir(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation));
if (configDir.path() == QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation)) {
configDir.mkdir("KShare");
configDir.cd("KShare");
}
static QSettings settings(configDir.absoluteFilePath("settings.ini"), QSettings::IniFormat);
return settings;
}