mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 00:22:31 -06:00
committed by
GitHub
parent
facfa26eed
commit
dd1bd8ad10
@@ -33,6 +33,8 @@
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
#include "base/pathfwd.h"
|
||||
|
||||
class QString;
|
||||
|
||||
namespace Private
|
||||
@@ -54,26 +56,26 @@ enum class SpecialFolder
|
||||
class Profile
|
||||
{
|
||||
public:
|
||||
static void initInstance(const QString &rootProfilePath, const QString &configurationName,
|
||||
static void initInstance(const Path &rootProfilePath, const QString &configurationName,
|
||||
bool convertPathsToProfileRelative);
|
||||
static void freeInstance();
|
||||
static const Profile *instance();
|
||||
|
||||
QString location(SpecialFolder folder) const;
|
||||
Path location(SpecialFolder folder) const;
|
||||
SettingsPtr applicationSettings(const QString &name) const;
|
||||
|
||||
QString rootPath() const;
|
||||
Path rootPath() const;
|
||||
QString configurationName() const;
|
||||
|
||||
/// Returns either default name for configuration file (QCoreApplication::applicationName())
|
||||
/// or the value, supplied via parameters
|
||||
QString profileName() const;
|
||||
|
||||
QString toPortablePath(const QString &absolutePath) const;
|
||||
QString fromPortablePath(const QString &portablePath) const;
|
||||
Path toPortablePath(const Path &absolutePath) const;
|
||||
Path fromPortablePath(const Path &portablePath) const;
|
||||
|
||||
private:
|
||||
Profile(const QString &rootProfilePath, const QString &configurationName, bool convertPathsToProfileRelative);
|
||||
Profile(const Path &rootProfilePath, const QString &configurationName, bool convertPathsToProfileRelative);
|
||||
~Profile() = default; // to generate correct call to ProfilePrivate::~ProfileImpl()
|
||||
|
||||
void ensureDirectoryExists(SpecialFolder folder) const;
|
||||
@@ -83,4 +85,4 @@ private:
|
||||
static Profile *m_instance;
|
||||
};
|
||||
|
||||
QString specialFolderLocation(SpecialFolder folder);
|
||||
Path specialFolderLocation(SpecialFolder folder);
|
||||
|
||||
Reference in New Issue
Block a user