Add const to almost all remaining vars and arguments that qualify

This commit is contained in:
thalieht 2019-02-21 23:31:43 +02:00
parent bb041c0eca
commit 70f1537d9f
35 changed files with 261 additions and 261 deletions

View file

@ -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;
}