summaryrefslogtreecommitdiffstats
path: root/logic/net/Download.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-10-06 01:13:40 +0200
committerPetr Mrázek <peterix@gmail.com>2013-10-06 01:13:40 +0200
commitf83119ce7ec3d11a903901b8eff762d2b0a9f635 (patch)
tree5c30d7b9fff0f9417e7f2cd79d8ad9ea56d7f056 /logic/net/Download.h
parenteba9b3d759dbf6e402e91ab897059f1d274aef90 (diff)
downloadMultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar.gz
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar.lz
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar.xz
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.zip
Added file logger
Diffstat (limited to 'logic/net/Download.h')
-rw-r--r--logic/net/Download.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/logic/net/Download.h b/logic/net/Download.h
index 91f09dec..ca4bee9f 100644
--- a/logic/net/Download.h
+++ b/logic/net/Download.h
@@ -2,10 +2,9 @@
#include <QObject>
#include <QUrl>
-#include <QSharedPointer>
+#include <memory>
#include <QNetworkReply>
-
enum JobStatus
{
Job_NotStarted,
@@ -18,20 +17,21 @@ class Download : public QObject
{
Q_OBJECT
protected:
- explicit Download(): QObject(0){};
+ explicit Download() : QObject(0) {};
+
public:
virtual ~Download() {};
public:
/// the network reply
- QSharedPointer<QNetworkReply> m_reply;
-
+ std::shared_ptr<QNetworkReply> m_reply;
+
/// source URL
QUrl m_url;
-
+
/// The file's status
JobStatus m_status;
-
+
/// index within the parent job
int index_within_job = 0;
@@ -46,9 +46,9 @@ protected slots:
virtual void downloadError(QNetworkReply::NetworkError error) = 0;
virtual void downloadFinished() = 0;
virtual void downloadReadyRead() = 0;
-
+
public slots:
virtual void start() = 0;
};
-typedef QSharedPointer<Download> DownloadPtr;
+typedef std::shared_ptr<Download> DownloadPtr;