mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Add const to almost all remaining vars and arguments that qualify
This commit is contained in:
parent
bb041c0eca
commit
70f1537d9f
35 changed files with 261 additions and 261 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue