mirror of https://github.com/mgba-emu/mgba.git
Qt: Add cache dir call, for later expansion
This commit is contained in:
parent
472660a5d3
commit
9ed00c95b6
|
@ -136,7 +136,7 @@ QUrl ApplicationUpdater::parseManifest(const QByteArray& manifest) {
|
|||
|
||||
QString ApplicationUpdater::destination() const {
|
||||
QFileInfo path(updateInfo().url.path());
|
||||
QDir dir(ConfigController::configDir());
|
||||
QDir dir(ConfigController::cacheDir());
|
||||
// QFileInfo::completeSuffix will eat all .'s in the filename...including
|
||||
// ones in the version string, turning mGBA-1.0.0-win32.7z into
|
||||
// 0.0-win32.7z instead of the intended .7z
|
||||
|
|
|
@ -382,3 +382,7 @@ const QString& ConfigController::configDir() {
|
|||
}
|
||||
return s_configDir;
|
||||
}
|
||||
|
||||
const QString& ConfigController::cacheDir() {
|
||||
return configDir();
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ public:
|
|||
void usage(const char* arg0) const;
|
||||
|
||||
static const QString& configDir();
|
||||
static const QString& cacheDir();
|
||||
static bool isPortable();
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -78,7 +78,7 @@ void ForwarderController::gotManifest(QNetworkReply* reply) {
|
|||
void ForwarderController::downloadBuild(const QUrl& url) {
|
||||
QString extension(QFileInfo(url.path()).suffix());
|
||||
// TODO: cache this
|
||||
QString configDir(ConfigController::configDir());
|
||||
QString configDir(ConfigController::cacheDir());
|
||||
m_sourceFile.setFileName(QString("%1/%2-%3-%4.%5").arg(configDir)
|
||||
.arg(projectName)
|
||||
.arg(m_generator->systemName())
|
||||
|
|
Loading…
Reference in New Issue