diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-07 04:00:58 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-07 04:00:58 +0200 |
commit | 6892c11e9f287dcfb1e698f8f46233a01fb7abb6 (patch) | |
tree | ee94607e92bcf39faef7f35842499fafbb2e270f /logic/net/DownloadJob.cpp | |
parent | 3f30055afe757637ae865b2adc7cf021edd9b8b5 (diff) | |
download | MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar.gz MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar.lz MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.tar.xz MultiMC-6892c11e9f287dcfb1e698f8f46233a01fb7abb6.zip |
Move a good chunk of the singleton objects into a new QApplication subclass.
Diffstat (limited to 'logic/net/DownloadJob.cpp')
-rw-r--r-- | logic/net/DownloadJob.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/logic/net/DownloadJob.cpp b/logic/net/DownloadJob.cpp index b87d3dc9..cad9ae72 100644 --- a/logic/net/DownloadJob.cpp +++ b/logic/net/DownloadJob.cpp @@ -1,6 +1,6 @@ #include "DownloadJob.h" #include "pathutils.h" -#include "NetWorker.h" +#include "MultiMC.h" Download::Download (QUrl url, QString target_path, QString expected_md5 ) :Job() @@ -49,8 +49,8 @@ void Download::start() QNetworkRequest request ( m_url ); request.setRawHeader(QString("If-None-Match").toLatin1(), m_expected_md5.toLatin1()); - auto &worker = NetWorker::qnam(); - QNetworkReply * rep = worker.get ( request ); + auto worker = MMC->qnam(); + QNetworkReply * rep = worker->get ( request ); m_reply = QSharedPointer<QNetworkReply> ( rep, &QObject::deleteLater ); connect ( rep, SIGNAL ( downloadProgress ( qint64,qint64 ) ), SLOT ( downloadProgress ( qint64,qint64 ) ) ); |