Allow to use proxy per subsystem

This commit is contained in:
Vladimir Golovnev (Glassez)
2023-01-28 20:40:38 +03:00
parent 4745a40f0b
commit 6ac14d0c57
23 changed files with 357 additions and 339 deletions

View File

@@ -52,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"
@@ -481,7 +482,8 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
// Launch downloader
Net::DownloadManager::instance()->download(
Net::DownloadRequest(source).limit(MAX_TORRENT_SIZE)
, true, dlg, &AddNewTorrentDialog::handleDownloadFinished);
, Preferences::instance()->useProxyForGeneralPurposes()
, dlg, &AddNewTorrentDialog::handleDownloadFinished);
return;
}