mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -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
|
@ -35,7 +35,6 @@
|
|||
#include <QSysInfo>
|
||||
#include <QXmlStreamReader>
|
||||
|
||||
#include "base/net/downloadhandler.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
|
@ -56,9 +55,9 @@ void ProgramUpdater::checkForUpdates()
|
|||
{
|
||||
// Don't change this User-Agent. In case our updater goes haywire,
|
||||
// the filehost can identify it and contact us.
|
||||
Net::DownloadHandler *handler = Net::DownloadManager::instance()->download(
|
||||
Net::DownloadRequest(RSS_URL).userAgent("qBittorrent/" QBT_VERSION_2 " ProgramUpdater (www.qbittorrent.org)"));
|
||||
connect(handler, &Net::DownloadHandler::finished, this, &ProgramUpdater::rssDownloadFinished);
|
||||
Net::DownloadManager::instance()->download(
|
||||
Net::DownloadRequest(RSS_URL).userAgent("qBittorrent/" QBT_VERSION_2 " ProgramUpdater (www.qbittorrent.org)")
|
||||
, this, &ProgramUpdater::rssDownloadFinished);
|
||||
}
|
||||
|
||||
void ProgramUpdater::rssDownloadFinished(const Net::DownloadResult &result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue