mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Use QString literals
The plan is to define `QT_NO_CAST_FROM_ASCII` eventually. PR #16561.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "base/global.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
Private::Profile::Profile(const QString &configurationName)
|
||||
@@ -91,7 +92,7 @@ Path Private::DefaultProfile::dataLocation() const
|
||||
// On Linux keep using the legacy directory ~/.local/share/data/ if it exists
|
||||
const Path genericDataPath {QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)};
|
||||
const Path profilePath {profileName()};
|
||||
const Path legacyDir = genericDataPath / Path("data") / profilePath;
|
||||
const Path legacyDir = genericDataPath / Path(u"data"_qs) / profilePath;
|
||||
|
||||
const Path dataDir = genericDataPath / profilePath;
|
||||
|
||||
@@ -130,10 +131,10 @@ Private::CustomProfile::CustomProfile(const Path &rootPath, const QString &confi
|
||||
: Profile {configurationName}
|
||||
, m_rootPath {rootPath}
|
||||
, m_basePath {m_rootPath / Path(profileName())}
|
||||
, m_cacheLocation {m_basePath / Path("cache")}
|
||||
, m_configLocation {m_basePath / Path("config")}
|
||||
, m_dataLocation {m_basePath / Path("data")}
|
||||
, m_downloadLocation {m_basePath / Path("downloads")}
|
||||
, m_cacheLocation {m_basePath / Path(u"cache"_qs)}
|
||||
, m_configLocation {m_basePath / Path(u"config"_qs)}
|
||||
, m_dataLocation {m_basePath / Path(u"data"_qs)}
|
||||
, m_downloadLocation {m_basePath / Path(u"downloads"_qs)}
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user