moonlight-qt/app/path.h
Cameron Gutman 80062d262e Remove manual qmlcachegen invocation for internal Qt QML files
It's not safe to always assume we can always precompile everything.
Instead set QML_CACHE_DIR to ensure the files go to our desired location.
2023-09-10 15:03:53 -05:00

28 lines
706 B
C++

#pragma once
#include <QString>
#include <QFileInfo>
class Path
{
public:
static QString getLogDir();
static QString getBoxArtCacheDir();
static QString getQmlCacheDir();
static QByteArray readDataFile(QString fileName);
static void writeCacheFile(QString fileName, QByteArray data);
static void deleteCacheFile(QString fileName);
static QFileInfo getCacheFileInfo(QString fileName);
// Only safe to use directly for Qt classes
static QString getDataFilePath(QString fileName);
static void initialize(bool portable);
private:
static QString s_CacheDir;
static QString s_LogDir;
static QString s_BoxArtCacheDir;
static QString s_QmlCacheDir;
};