14 lines
422 B
C++
14 lines
422 B
C++
#include "settings.hpp"
|
|
|
|
#include <QStandardPaths>
|
|
|
|
QSettings &settings::settings() {
|
|
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;
|
|
}
|