mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Combine qAsConst() with copyAsConst() to asConst()
This commit is contained in:
@@ -439,9 +439,9 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
|
||||
// disable mouse wheel event on widgets to avoid mis-selection
|
||||
WheelEventEater *wheelEventEater = new WheelEventEater(this);
|
||||
for (QComboBox *widget : copyAsConst(findChildren<QComboBox *>()))
|
||||
for (QComboBox *widget : asConst(findChildren<QComboBox *>()))
|
||||
widget->installEventFilter(wheelEventEater);
|
||||
for (QSpinBox *widget : copyAsConst(findChildren<QSpinBox *>()))
|
||||
for (QSpinBox *widget : asConst(findChildren<QSpinBox *>()))
|
||||
widget->installEventFilter(wheelEventEater);
|
||||
|
||||
loadWindowState();
|
||||
@@ -479,7 +479,7 @@ OptionsDialog::~OptionsDialog()
|
||||
|
||||
saveWindowState();
|
||||
|
||||
for (const QString &path : qAsConst(m_addedScanDirs))
|
||||
for (const QString &path : asConst(m_addedScanDirs))
|
||||
ScanFoldersModel::instance()->removePath(path);
|
||||
ScanFoldersModel::instance()->configure(); // reloads "removed" paths
|
||||
delete m_ui;
|
||||
|
||||
Reference in New Issue
Block a user