summaryrefslogtreecommitdiffstats
path: root/logic/net
diff options
context:
space:
mode:
Diffstat (limited to 'logic/net')
-rw-r--r--logic/net/CacheDownload.cpp5
-rw-r--r--logic/net/HttpMetaCache.cpp1
-rw-r--r--logic/net/NetAction.h6
3 files changed, 5 insertions, 7 deletions
diff --git a/logic/net/CacheDownload.cpp b/logic/net/CacheDownload.cpp
index d79feb14..1ac55180 100644
--- a/logic/net/CacheDownload.cpp
+++ b/logic/net/CacheDownload.cpp
@@ -182,8 +182,11 @@ void CacheDownload::downloadReadyRead()
{
qCritical() << "Failed writing into " + m_target_path;
m_status = Job_Failed;
- m_reply->abort();
+ m_output_file->cancelWriting();
+ m_output_file.reset();
emit failed(m_index_within_job);
+ wroteAnyData = false;
+ return;
}
wroteAnyData = true;
}
diff --git a/logic/net/HttpMetaCache.cpp b/logic/net/HttpMetaCache.cpp
index 68bfa89c..ea3e2834 100644
--- a/logic/net/HttpMetaCache.cpp
+++ b/logic/net/HttpMetaCache.cpp
@@ -19,7 +19,6 @@
#include <QFileInfo>
#include <QFile>
-#include <QTemporaryFile>
#include <QDateTime>
#include <QCryptographicHash>
diff --git a/logic/net/NetAction.h b/logic/net/NetAction.h
index 1d7eb94b..3c395605 100644
--- a/logic/net/NetAction.h
+++ b/logic/net/NetAction.h
@@ -32,7 +32,7 @@ enum JobStatus
};
typedef std::shared_ptr<class NetAction> NetActionPtr;
-class MULTIMC_LOGIC_EXPORT NetAction : public QObject, public std::enable_shared_from_this<NetAction>
+class MULTIMC_LOGIC_EXPORT NetAction : public QObject
{
Q_OBJECT
protected:
@@ -54,10 +54,6 @@ public:
{
return m_failures;
}
- NetActionPtr getSharedPtr()
- {
- return shared_from_this();
- }
public:
/// the network reply