Merge pull request #18528 from glassez/proxy

Allow to use proxy per subsystem
This commit is contained in:
Vladimir Golovnev
2023-02-27 20:34:51 +03:00
committed by GitHub
29 changed files with 598 additions and 545 deletions

View File

@@ -32,6 +32,7 @@
#include <algorithm>
#include <QAction>
#include <QDateTime>
#include <QDebug>
#include <QDir>
#include <QFileDialog>
@@ -51,6 +52,7 @@
#include "base/bittorrent/torrentcontentlayout.h"
#include "base/global.h"
#include "base/net/downloadmanager.h"
#include "base/preferences.h"
#include "base/settingsstorage.h"
#include "base/torrentfileguard.h"
#include "base/utils/compare.h"
@@ -474,8 +476,9 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
{
// Launch downloader
Net::DownloadManager::instance()->download(
Net::DownloadRequest(source).limit(MAX_TORRENT_SIZE)
, dlg, &AddNewTorrentDialog::handleDownloadFinished);
Net::DownloadRequest(source).limit(MAX_TORRENT_SIZE)
, Preferences::instance()->useProxyForGeneralPurposes()
, dlg, &AddNewTorrentDialog::handleDownloadFinished);
return;
}