looqs/shared/common.cpp

22 行
491 B
C++
Raw 通常表示 履歴

#include <QProcessEnvironment>
#include <QSettings>
#include "common.h"
void Common::setupAppInfo()
{
QCoreApplication::setOrganizationName("quitesimple.org");
QCoreApplication::setOrganizationDomain("quitesimple.org");
QCoreApplication::setApplicationName("qss");
}
QString Common::databasePath()
{
QString env = QProcessEnvironment::systemEnvironment().value("QSS_DB_OVERRIDE");
if(env == "")
{
QSettings settings;
return settings.value("dbpath").toString();
}
return env;
}