2022-01-06 15:29:19 -04:00
|
|
|
#include "constants.h"
|
2022-02-22 09:02:34 +01:00
|
|
|
|
2022-01-06 15:29:19 -04:00
|
|
|
#include <QDir>
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QStandardPaths>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
// TODO: merge with constants from backend/
|
|
|
|
|
2022-02-22 09:02:34 +01:00
|
|
|
QString Constants::applicationPath(const QString& path)
|
2022-01-06 15:29:19 -04:00
|
|
|
{
|
2022-02-21 19:03:38 +01:00
|
|
|
return QFileInfo(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + path).absoluteFilePath();
|
2022-01-06 15:29:19 -04:00
|
|
|
}
|
|
|
|
|
2022-02-22 09:02:34 +01:00
|
|
|
QString Constants::tmpPath(const QString& path)
|
2022-01-06 15:29:19 -04:00
|
|
|
{
|
2022-02-21 19:03:38 +01:00
|
|
|
return QFileInfo(QStandardPaths::writableLocation(QStandardPaths::TempLocation) + path).absoluteFilePath();
|
2022-01-06 15:29:19 -04:00
|
|
|
}
|
|
|
|
|
2022-02-22 09:02:34 +01:00
|
|
|
QString Constants::cachePath(const QString& path)
|
2022-01-06 15:29:19 -04:00
|
|
|
{
|
2022-02-21 19:03:38 +01:00
|
|
|
return QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + path).absoluteFilePath();
|
2022-01-06 15:29:19 -04:00
|
|
|
}
|