looqs/shared/common.cpp

22 lines
491 B
C++
Raw Normal View 히스토리

#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;
}