Implement DownloadRequest helper

This commit is contained in:
Vladimir Golovnev (Glassez)
2018-06-20 17:07:07 +03:00
committed by sledgehammer999
parent 945466968c
commit c893729d62
4 changed files with 121 additions and 33 deletions

View File

@@ -31,6 +31,7 @@
#define NET_DOWNLOADHANDLER_H
#include <QObject>
#include "downloadmanager.h"
class QNetworkAccessManager;
class QNetworkReply;
@@ -45,7 +46,7 @@ namespace Net
Q_OBJECT
public:
DownloadHandler(QNetworkReply *reply, DownloadManager *manager, bool saveToFile = false, qint64 limit = 0, bool handleRedirectToMagnet = false);
DownloadHandler(QNetworkReply *reply, DownloadManager *manager, const DownloadRequest &downloadRequest);
~DownloadHandler();
QString url() const;
@@ -67,10 +68,7 @@ namespace Net
QNetworkReply *m_reply;
DownloadManager *m_manager;
bool m_saveToFile;
qint64 m_sizeLimit;
bool m_handleRedirectToMagnet;
QString m_url;
const DownloadRequest m_downloadRequest;
};
}