mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
parent
a9a6b74416
commit
8d438e159c
5 changed files with 226 additions and 115 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2015, 2018 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -33,7 +33,6 @@
|
|||
#include <QObject>
|
||||
#include "downloadmanager.h"
|
||||
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class QUrl;
|
||||
|
||||
|
@ -44,10 +43,14 @@ namespace Net
|
|||
class DownloadHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(DownloadHandler)
|
||||
|
||||
friend class DownloadManager;
|
||||
|
||||
DownloadHandler(QNetworkReply *reply, DownloadManager *manager, const DownloadRequest &downloadRequest);
|
||||
|
||||
public:
|
||||
DownloadHandler(QNetworkReply *reply, DownloadManager *manager, const DownloadRequest &downloadRequest);
|
||||
~DownloadHandler();
|
||||
~DownloadHandler() override;
|
||||
|
||||
QString url() const;
|
||||
|
||||
|
@ -62,7 +65,7 @@ namespace Net
|
|||
void checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal);
|
||||
|
||||
private:
|
||||
void init();
|
||||
void assignNetworkReply(QNetworkReply *reply);
|
||||
bool saveToFile(const QByteArray &replyData, QString &filePath);
|
||||
void handleRedirection(QUrl newUrl);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue