2020-05-24 15:36:27 +02:00
|
|
|
#include <QProcessEnvironment>
|
|
|
|
#include <QSettings>
|
2020-05-23 22:52:42 +02:00
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
void Common::setupAppInfo()
|
|
|
|
{
|
|
|
|
QCoreApplication::setOrganizationName("quitesimple.org");
|
2020-05-24 15:36:27 +02:00
|
|
|
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;
|
2020-05-23 22:52:42 +02:00
|
|
|
}
|