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");
|
|
|
|
QCoreApplication::setOrganizationDomain("quitesimple.org");
|
|
|
|
QCoreApplication::setApplicationName("qss");
|
|
|
|
}
|
2020-05-24 15:36:27 +02:00
|
|
|
|
|
|
|
QString Common::databasePath()
|
|
|
|
{
|
|
|
|
QString env = QProcessEnvironment::systemEnvironment().value("QSS_DB_OVERRIDE");
|
|
|
|
if(env == "")
|
|
|
|
{
|
|
|
|
QSettings settings;
|
|
|
|
return settings.value("dbpath").toString();
|
|
|
|
}
|
|
|
|
return env;
|
|
|
|
}
|