mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Replace wrappers in base/utils/fs.h with Profile::SpecialFolders::location()
This commit is contained in:
@@ -50,8 +50,6 @@
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "base/profile.h"
|
||||
|
||||
/**
|
||||
* Converts a path to a string suitable for display.
|
||||
* This function makes sure the directory separator used is consistent
|
||||
@@ -317,30 +315,6 @@ QString Utils::Fs::expandPathAbs(const QString& path)
|
||||
return ret;
|
||||
}
|
||||
|
||||
QString Utils::Fs::QDesktopServicesDataLocation()
|
||||
{
|
||||
return Profile::instance().location(SpecialFolder::Data);
|
||||
}
|
||||
|
||||
QString Utils::Fs::QDesktopServicesCacheLocation()
|
||||
{
|
||||
return Profile::instance().location(SpecialFolder::Cache);
|
||||
}
|
||||
|
||||
QString Utils::Fs::QDesktopServicesDownloadLocation()
|
||||
{
|
||||
return Profile::instance().location(SpecialFolder::Downloads);
|
||||
}
|
||||
|
||||
QString Utils::Fs::cacheLocation()
|
||||
{
|
||||
QString location = expandPathAbs(QDesktopServicesCacheLocation());
|
||||
QDir locationDir(location);
|
||||
if (!locationDir.exists())
|
||||
locationDir.mkpath(locationDir.absolutePath());
|
||||
return location;
|
||||
}
|
||||
|
||||
QString Utils::Fs::tempPath()
|
||||
{
|
||||
static const QString path = QDir::tempPath() + "/.qBittorrent/";
|
||||
|
||||
Reference in New Issue
Block a user