status-desktop/src-cpp/app_service/constants.cpp

25 lines
631 B
C++
Raw Normal View History

2022-01-06 19:29:19 +00:00
#include "constants.h"
#include <QDir>
#include <QFileInfo>
#include <QStandardPaths>
#include <QString>
// TODO: merge with constants from backend/
QString Constants::applicationPath(QString path)
{
return QFileInfo(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + path).absoluteFilePath();
}
QString Constants::tmpPath(QString path)
{
return QFileInfo(QStandardPaths::writableLocation(QStandardPaths::TempLocation) + path).absoluteFilePath();
}
QString Constants::cachePath(QString path)
{
return QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + path).absoluteFilePath();
}