mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 05:01:25 -07:00
Use range-based for loops
This commit is contained in:
parent
10e1c35998
commit
e92209475e
4 changed files with 7 additions and 10 deletions
|
@ -112,7 +112,7 @@ void AppController::preferencesAction()
|
|||
// Automatically add torrents from
|
||||
const QVariantHash dirs = pref->getScanDirs();
|
||||
QVariantMap nativeDirs;
|
||||
for (QVariantHash::const_iterator i = dirs.cbegin(), e = dirs.cend(); i != e; ++i) {
|
||||
for (auto i = dirs.cbegin(); i != dirs.cend(); ++i) {
|
||||
if (i.value().type() == QVariant::Int)
|
||||
nativeDirs.insert(Utils::Fs::toNativePath(i.key()), i.value().toInt());
|
||||
else
|
||||
|
@ -299,7 +299,7 @@ void AppController::setPreferencesAction()
|
|||
QVariantHash oldScanDirs = pref->getScanDirs();
|
||||
QVariantHash scanDirs;
|
||||
ScanFoldersModel *model = ScanFoldersModel::instance();
|
||||
for (QVariantMap::const_iterator i = nativeDirs.cbegin(), e = nativeDirs.cend(); i != e; ++i) {
|
||||
for (auto i = nativeDirs.cbegin(); i != nativeDirs.cend(); ++i) {
|
||||
QString folder = Utils::Fs::fromNativePath(i.key());
|
||||
int downloadType;
|
||||
QString downloadPath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue