mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 21:28:07 -06:00
Redesign "Incomplete folder" feature
Change "Incomplete/temp folder" term with "download folder". Allow to set "download folder" per torrent (in manual mode) and per category (in automatic mode).
This commit is contained in:
committed by
Vladimir Golovnev (glassez)
parent
b0e41abf5a
commit
1c0f8b4289
@@ -72,9 +72,14 @@ QString Utils::Fs::toUniformPath(const QString &path)
|
||||
return QDir::fromNativeSeparators(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the file extension part of a file name.
|
||||
*/
|
||||
QString Utils::Fs::resolvePath(const QString &relativePath, const QString &basePath)
|
||||
{
|
||||
Q_ASSERT(QDir::isRelativePath(relativePath));
|
||||
Q_ASSERT(QDir::isAbsolutePath(basePath));
|
||||
|
||||
return (relativePath.isEmpty() ? basePath : QDir(basePath).absoluteFilePath(relativePath));
|
||||
}
|
||||
|
||||
QString Utils::Fs::fileExtension(const QString &filename)
|
||||
{
|
||||
const QString name = filename.endsWith(QB_EXT)
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace Utils::Fs
|
||||
* with the OS being run.
|
||||
*/
|
||||
QString toNativePath(const QString &path);
|
||||
|
||||
/**
|
||||
* Converts a path to a string suitable for processing.
|
||||
* This function makes sure the directory separator used is independent
|
||||
@@ -50,7 +51,16 @@ namespace Utils::Fs
|
||||
*/
|
||||
QString toUniformPath(const QString &path);
|
||||
|
||||
/**
|
||||
* If `path is relative then resolves it against `basePath`, otherwise returns the `path` itself
|
||||
*/
|
||||
QString resolvePath(const QString &relativePath, const QString &basePath);
|
||||
|
||||
/**
|
||||
* Returns the file extension part of a file name.
|
||||
*/
|
||||
QString fileExtension(const QString &filename);
|
||||
|
||||
QString fileName(const QString &filePath);
|
||||
QString folderName(const QString &filePath);
|
||||
qint64 computePathSize(const QString &path);
|
||||
|
||||
Reference in New Issue
Block a user