Convert pass-by-value arguments to const refs where applicable

This commit is contained in:
thalieht 2019-02-12 02:45:30 +02:00
parent ca3ce87e06
commit 445adb0ab4
18 changed files with 84 additions and 84 deletions

View file

@ -338,7 +338,7 @@ TransferListModel *TransferListWidget::getSourceModel() const
return m_listModel;
}
void TransferListWidget::previewFile(QString filePath)
void TransferListWidget::previewFile(const QString &filePath)
{
Utils::Misc::openPath(filePath);
}
@ -854,7 +854,7 @@ void TransferListWidget::renameSelectedTorrent()
}
}
void TransferListWidget::setSelectionCategory(QString category)
void TransferListWidget::setSelectionCategory(const QString &category)
{
for (const QModelIndex &index : asConst(selectionModel()->selectedRows()))
m_listModel->setData(m_listModel->index(mapToSource(index).row(), TransferListModel::TR_CATEGORY), category, Qt::DisplayRole);
@ -1173,7 +1173,7 @@ void TransferListWidget::currentChanged(const QModelIndex &current, const QModel
emit currentTorrentChanged(torrent);
}
void TransferListWidget::applyCategoryFilter(QString category)
void TransferListWidget::applyCategoryFilter(const QString &category)
{
if (category.isNull())
m_sortFilterModel->disableCategoryFilter();