Replace wrappers in base/utils/fs.h with Profile::SpecialFolders::location()

This commit is contained in:
Eugene Shalygin
2016-05-11 13:25:29 +02:00
parent 44b6cb28f6
commit 0bf7fa15c1
9 changed files with 20 additions and 43 deletions

View File

@@ -35,6 +35,7 @@
#include "base/logger.h"
#include "base/preferences.h"
#include "base/profile.h"
#include "base/utils/fs.h"
#include "base/utils/gzip.h"
#include "downloadmanager.h"
@@ -94,7 +95,7 @@ void GeoIPManager::loadDatabase()
}
QString filepath = Utils::Fs::expandPathAbs(
QString("%1%2/%3").arg(Utils::Fs::QDesktopServicesDataLocation())
QString("%1%2/%3").arg(specialFolderLocation(SpecialFolder::Data))
.arg(GEOIP_FOLDER).arg(GEOIP_FILENAME));
QString error;
@@ -431,7 +432,7 @@ void GeoIPManager::downloadFinished(const QString &url, QByteArray data)
.arg(m_geoIPDatabase->type()).arg(m_geoIPDatabase->buildEpoch().toString()),
Log::INFO);
QString targetPath = Utils::Fs::expandPathAbs(
Utils::Fs::QDesktopServicesDataLocation() + GEOIP_FOLDER);
specialFolderLocation(SpecialFolder::Data) + GEOIP_FOLDER);
if (!QDir(targetPath).exists())
QDir().mkpath(targetPath);
QFile targetFile(QString("%1/%2").arg(targetPath).arg(GEOIP_FILENAME));