mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Use DownloadHandler behind the scenes
This commit is contained in:
parent
6cb15706f5
commit
746916a963
17 changed files with 325 additions and 409 deletions
|
@ -42,7 +42,6 @@
|
|||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/bittorrent/torrentinfo.h"
|
||||
#include "base/global.h"
|
||||
#include "base/net/downloadhandler.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/settingsstorage.h"
|
||||
|
@ -237,9 +236,9 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
|
|||
|
||||
if (Net::DownloadManager::hasSupportedScheme(source)) {
|
||||
// Launch downloader
|
||||
Net::DownloadHandler *handler = Net::DownloadManager::instance()->download(
|
||||
Net::DownloadRequest(source).limit(10485760 /* 10MB */));
|
||||
connect(handler, &Net::DownloadHandler::finished, dlg, &AddNewTorrentDialog::handleDownloadFinished);
|
||||
Net::DownloadManager::instance()->download(
|
||||
Net::DownloadRequest(source).limit(10485760 /* 10MB */)
|
||||
, dlg, &AddNewTorrentDialog::handleDownloadFinished);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue