mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Add const to many vars and arguments
Also remove const in declarations' arguments that are passed by value
This commit is contained in:
parent
fc534e88a3
commit
ca3ce87e06
21 changed files with 217 additions and 219 deletions
|
@ -85,8 +85,8 @@ void FileLogger::changePath(const QString &newPath)
|
|||
|
||||
void FileLogger::deleteOld(const int age, const FileLogAgeType ageType)
|
||||
{
|
||||
QDateTime date = QDateTime::currentDateTime();
|
||||
QDir dir(Utils::Fs::branchPath(m_path));
|
||||
const QDateTime date = QDateTime::currentDateTime();
|
||||
const QDir dir(Utils::Fs::branchPath(m_path));
|
||||
|
||||
for (const QFileInfo &file : asConst(dir.entryInfoList(QStringList("qbittorrent.log.bak*"), QDir::Files | QDir::Writable, QDir::Time | QDir::Reversed))) {
|
||||
QDateTime modificationDate = file.lastModified();
|
||||
|
@ -111,7 +111,7 @@ void FileLogger::setBackup(bool value)
|
|||
m_backup = value;
|
||||
}
|
||||
|
||||
void FileLogger::setMaxSize(int value)
|
||||
void FileLogger::setMaxSize(const int value)
|
||||
{
|
||||
m_maxSize = value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue