mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 03:50:20 -07:00
Combine qAsConst() with copyAsConst() to asConst()
This commit is contained in:
parent
6b1d26d555
commit
1f36b8b89f
57 changed files with 199 additions and 202 deletions
|
@ -143,7 +143,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||
m_ui->categoryComboBox->addItem(defaultCategory);
|
||||
m_ui->categoryComboBox->addItem("");
|
||||
|
||||
for (const QString &category : qAsConst(categories))
|
||||
for (const QString &category : asConst(categories))
|
||||
if (category != defaultCategory && category != m_torrentParams.category)
|
||||
m_ui->categoryComboBox->addItem(category);
|
||||
|
||||
|
@ -398,7 +398,7 @@ void AddNewTorrentDialog::saveSavePathHistory() const
|
|||
// Get current history
|
||||
QStringList history = settings()->loadValue(KEY_SAVEPATHHISTORY).toStringList();
|
||||
QVector<QDir> historyDirs;
|
||||
for (const QString &path : qAsConst(history))
|
||||
for (const QString &path : asConst(history))
|
||||
historyDirs << QDir {path};
|
||||
|
||||
const QDir selectedSavePath {m_ui->savePath->selectedPath()};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue