diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-06 01:13:40 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-06 01:13:40 +0200 |
commit | f83119ce7ec3d11a903901b8eff762d2b0a9f635 (patch) | |
tree | 5c30d7b9fff0f9417e7f2cd79d8ad9ea56d7f056 /logic/net/CacheDownload.cpp | |
parent | eba9b3d759dbf6e402e91ab897059f1d274aef90 (diff) | |
download | MultiMC-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/CacheDownload.cpp')
-rw-r--r-- | logic/net/CacheDownload.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/logic/net/CacheDownload.cpp b/logic/net/CacheDownload.cpp index 9fc1f127..0e653e05 100644 --- a/logic/net/CacheDownload.cpp +++ b/logic/net/CacheDownload.cpp @@ -5,7 +5,7 @@ #include <QCryptographicHash> #include <QFileInfo> #include <QDateTime> -#include <QDebug> +#include <logger/QsLog.h> CacheDownload::CacheDownload(QUrl url, MetaEntryPtr entry) : Download(), md5sum(QCryptographicHash::Md5) @@ -31,7 +31,7 @@ void CacheDownload::start() emit failed(index_within_job); return; } - qDebug() << "Downloading " << m_url.toString(); + QLOG_INFO() << "Downloading " << m_url.toString(); QNetworkRequest request(m_url); request.setRawHeader(QString("If-None-Match").toLatin1(), m_entry->etag.toLatin1()); request.setHeader(QNetworkRequest::UserAgentHeader,"MultiMC/5.0 (Cached)"); @@ -39,7 +39,7 @@ void CacheDownload::start() auto worker = MMC->qnam(); QNetworkReply *rep = worker->get(request); - m_reply = QSharedPointer<QNetworkReply>(rep, &QObject::deleteLater); + m_reply = std::shared_ptr<QNetworkReply>(rep); connect(rep, SIGNAL(downloadProgress(qint64, qint64)), SLOT(downloadProgress(qint64, qint64))); connect(rep, SIGNAL(finished()), SLOT(downloadFinished())); @@ -92,7 +92,7 @@ void CacheDownload::downloadFinished() m_entry->stale = false; MMC->metacache()->updateEntry(m_entry); - m_reply.clear(); + m_reply.reset(); emit succeeded(index_within_job); return; } @@ -101,7 +101,7 @@ void CacheDownload::downloadFinished() { m_output_file.close(); m_output_file.remove(); - m_reply.clear(); + m_reply.reset(); emit failed(index_within_job); return; } |