mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 13:48:05 -06:00
Add const to almost all remaining vars and arguments that qualify
This commit is contained in:
@@ -103,7 +103,7 @@ SettingsPtr Private::DefaultProfile::applicationSettings(const QString &name) co
|
||||
#endif
|
||||
}
|
||||
|
||||
QString Private::DefaultProfile::locationWithConfigurationName(QStandardPaths::StandardLocation location) const
|
||||
QString Private::DefaultProfile::locationWithConfigurationName(const QStandardPaths::StandardLocation location) const
|
||||
{
|
||||
return QStandardPaths::writableLocation(location) + configurationSuffix();
|
||||
}
|
||||
@@ -174,9 +174,9 @@ QString Private::Converter::toPortablePath(const QString &path) const
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (QDir::isAbsolutePath(path)) {
|
||||
QChar driveLeter = path[0].toUpper();
|
||||
QChar baseDriveLetter = m_baseDir.path()[0].toUpper();
|
||||
bool onSameDrive = (driveLeter.category() == QChar::Letter_Uppercase) && (driveLeter == baseDriveLetter);
|
||||
const QChar driveLeter = path[0].toUpper();
|
||||
const QChar baseDriveLetter = m_baseDir.path()[0].toUpper();
|
||||
const bool onSameDrive = (driveLeter.category() == QChar::Letter_Uppercase) && (driveLeter == baseDriveLetter);
|
||||
if (!onSameDrive)
|
||||
return path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user