Browse Source

Prevent detach from containers

adaptive-webui-19844
Chocobo1 7 years ago
parent
commit
141a2d2856
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/rss/rss_autodownloader.cpp
  2. 3
      src/webui/api/torrentscontroller.cpp

2
src/base/rss/rss_autodownloader.cpp

@ -275,7 +275,7 @@ void AutoDownloader::importRulesFromLegacyFormat(const QByteArray &data) @@ -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()));
}

3
src/webui/api/torrentscontroller.cpp

@ -43,6 +43,7 @@ @@ -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() @@ -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()));

Loading…
Cancel
Save