mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Prevent detach from containers
This commit is contained in:
parent
7233274110
commit
141a2d2856
@ -275,7 +275,7 @@ void AutoDownloader::importRulesFromLegacyFormat(const QByteArray &data)
|
|||||||
if (in.status() != QDataStream::Ok)
|
if (in.status() != QDataStream::Ok)
|
||||||
throw ParsingError(tr("Invalid data format"));
|
throw ParsingError(tr("Invalid data format"));
|
||||||
|
|
||||||
for (const QVariant &val : dict)
|
for (const QVariant &val : qAsConst(dict))
|
||||||
insertRule(AutoDownloadRule::fromLegacyDict(val.toHash()));
|
insertRule(AutoDownloadRule::fromLegacyDict(val.toHash()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "base/bittorrent/torrenthandle.h"
|
#include "base/bittorrent/torrenthandle.h"
|
||||||
#include "base/bittorrent/torrentinfo.h"
|
#include "base/bittorrent/torrentinfo.h"
|
||||||
#include "base/bittorrent/trackerentry.h"
|
#include "base/bittorrent/trackerentry.h"
|
||||||
|
#include "base/global.h"
|
||||||
#include "base/logger.h"
|
#include "base/logger.h"
|
||||||
#include "base/net/downloadmanager.h"
|
#include "base/net/downloadmanager.h"
|
||||||
#include "base/torrentfilter.h"
|
#include "base/torrentfilter.h"
|
||||||
@ -493,7 +494,7 @@ void TorrentsController::addAction()
|
|||||||
params.downloadLimit = (dlLimit > 0) ? dlLimit : -1;
|
params.downloadLimit = (dlLimit > 0) ? dlLimit : -1;
|
||||||
|
|
||||||
bool partialSuccess = false;
|
bool partialSuccess = false;
|
||||||
for (QString url : urls.split('\n')) {
|
for (QString url : copyAsConst(urls.split('\n'))) {
|
||||||
url = url.trimmed();
|
url = url.trimmed();
|
||||||
if (!url.isEmpty()) {
|
if (!url.isEmpty()) {
|
||||||
Net::DownloadManager::instance()->setCookiesFromUrl(cookies, QUrl::fromEncoded(url.toUtf8()));
|
Net::DownloadManager::instance()->setCookiesFromUrl(cookies, QUrl::fromEncoded(url.toUtf8()));
|
||||||
|
Loading…
Reference in New Issue
Block a user