mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-12 05:44:14 +03:00
Convert vars into refs to avoid copy construction from const refs
This commit is contained in:
parent
400792d18e
commit
92a290895b
3 changed files with 4 additions and 4 deletions
|
@ -468,6 +468,6 @@ bool isDarkTheme()
|
|||
{
|
||||
const QPalette pal = QApplication::palette();
|
||||
// QPalette::Base is used for the background of the Treeview
|
||||
const QColor color = pal.color(QPalette::Active, QPalette::Base);
|
||||
const QColor &color = pal.color(QPalette::Active, QPalette::Base);
|
||||
return (color.lightness() < 127);
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ void AppController::setPreferencesAction()
|
|||
|
||||
// Update deleted folders
|
||||
for (auto i = oldScanDirs.cbegin(); i != oldScanDirs.cend(); ++i) {
|
||||
const QString folder = i.key();
|
||||
const QString &folder = i.key();
|
||||
if (!scanDirs.contains(folder)) {
|
||||
model->removePath(folder);
|
||||
qDebug("Removed watched folder %s", qUtf8Printable(folder));
|
||||
|
|
|
@ -434,9 +434,9 @@ void SyncController::maindataAction()
|
|||
data["torrents"] = torrents;
|
||||
|
||||
QVariantHash categories;
|
||||
const auto categoriesList = session->categories();
|
||||
const auto &categoriesList = session->categories();
|
||||
for (auto it = categoriesList.cbegin(); it != categoriesList.cend(); ++it) {
|
||||
const auto key = it.key();
|
||||
const auto &key = it.key();
|
||||
categories[key] = QVariantMap {
|
||||
{"name", key},
|
||||
{"savePath", it.value()}
|
||||
|
|
Loading…
Reference in a new issue