diff --git a/src/base/rss/rss_autodownloader.cpp b/src/base/rss/rss_autodownloader.cpp index f18afaec7..1e070f26f 100644 --- a/src/base/rss/rss_autodownloader.cpp +++ b/src/base/rss/rss_autodownloader.cpp @@ -275,7 +275,7 @@ void AutoDownloader::importRulesFromLegacyFormat(const QByteArray &data) if (in.status() != QDataStream::Ok) throw ParsingError(tr("Invalid data format")); - for (const QVariant &val : dict) + for (const QVariant &val : qAsConst(dict)) insertRule(AutoDownloadRule::fromLegacyDict(val.toHash())); } diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 8aea27c0b..8b6f25e76 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -43,6 +43,7 @@ #include "base/bittorrent/torrenthandle.h" #include "base/bittorrent/torrentinfo.h" #include "base/bittorrent/trackerentry.h" +#include "base/global.h" #include "base/logger.h" #include "base/net/downloadmanager.h" #include "base/torrentfilter.h" @@ -493,7 +494,7 @@ void TorrentsController::addAction() params.downloadLimit = (dlLimit > 0) ? dlLimit : -1; bool partialSuccess = false; - for (QString url : urls.split('\n')) { + for (QString url : copyAsConst(urls.split('\n'))) { url = url.trimmed(); if (!url.isEmpty()) { Net::DownloadManager::instance()->setCookiesFromUrl(cookies, QUrl::fromEncoded(url.toUtf8()));