summaryrefslogtreecommitdiffstats
path: root/logic/net
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-03-30 20:11:05 +0200
committerPetr Mrázek <peterix@gmail.com>2014-03-30 20:11:41 +0200
commitfbc29b6a0626f2ce8521dc74e3171b634d68e9e5 (patch)
treed2d79201be585131be2ab0cd7d337237887af5a0 /logic/net
parente1e1d99102936b419aac52974f1fdb8be835b0d4 (diff)
downloadMultiMC-fbc29b6a0626f2ce8521dc74e3171b634d68e9e5.tar
MultiMC-fbc29b6a0626f2ce8521dc74e3171b634d68e9e5.tar.gz
MultiMC-fbc29b6a0626f2ce8521dc74e3171b634d68e9e5.tar.lz
MultiMC-fbc29b6a0626f2ce8521dc74e3171b634d68e9e5.tar.xz
MultiMC-fbc29b6a0626f2ce8521dc74e3171b634d68e9e5.zip
Fix many memory leaks.
Diffstat (limited to 'logic/net')
-rw-r--r--logic/net/ByteArrayDownload.h2
-rw-r--r--logic/net/CacheDownload.h1
-rw-r--r--logic/net/ForgeMirrors.h2
-rw-r--r--logic/net/ForgeXzDownload.h1
-rw-r--r--logic/net/MD5EtagDownload.h1
-rw-r--r--logic/net/NetJob.h2
-rw-r--r--logic/net/PasteUpload.h1
7 files changed, 7 insertions, 3 deletions
diff --git a/logic/net/ByteArrayDownload.h b/logic/net/ByteArrayDownload.h
index 0d90abc2..76e2e279 100644
--- a/logic/net/ByteArrayDownload.h
+++ b/logic/net/ByteArrayDownload.h
@@ -26,7 +26,7 @@ public:
{
return ByteArrayDownloadPtr(new ByteArrayDownload(url));
}
-
+ virtual ~ByteArrayDownload() {};
public:
/// if not saving to file, downloaded data is placed here
QByteArray m_data;
diff --git a/logic/net/CacheDownload.h b/logic/net/CacheDownload.h
index 154f5988..d446d23e 100644
--- a/logic/net/CacheDownload.h
+++ b/logic/net/CacheDownload.h
@@ -41,6 +41,7 @@ public:
{
return CacheDownloadPtr(new CacheDownload(url, entry));
}
+ virtual ~CacheDownload(){};
QString getTargetFilepath()
{
return m_target_path;
diff --git a/logic/net/ForgeMirrors.h b/logic/net/ForgeMirrors.h
index 990e49d6..6784fba1 100644
--- a/logic/net/ForgeMirrors.h
+++ b/logic/net/ForgeMirrors.h
@@ -39,7 +39,7 @@ public:
{
return ForgeMirrorsPtr(new ForgeMirrors(libs, parent_job, mirrorlist));
}
-
+ virtual ~ForgeMirrors(){};
protected
slots:
virtual void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
diff --git a/logic/net/ForgeXzDownload.h b/logic/net/ForgeXzDownload.h
index 990f91f0..7bdfb6d9 100644
--- a/logic/net/ForgeXzDownload.h
+++ b/logic/net/ForgeXzDownload.h
@@ -45,6 +45,7 @@ public:
{
return ForgeXzDownloadPtr(new ForgeXzDownload(relative_path, entry));
}
+ virtual ~ForgeXzDownload(){};
void setMirrors(QList<ForgeMirror> & mirrors);
protected
diff --git a/logic/net/MD5EtagDownload.h b/logic/net/MD5EtagDownload.h
index d5aed0ca..f5031e46 100644
--- a/logic/net/MD5EtagDownload.h
+++ b/logic/net/MD5EtagDownload.h
@@ -38,6 +38,7 @@ public:
{
return Md5EtagDownloadPtr(new MD5EtagDownload(url, target_path));
}
+ virtual ~MD5EtagDownload(){};
protected
slots:
virtual void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
diff --git a/logic/net/NetJob.h b/logic/net/NetJob.h
index 03d6a36e..2df8428b 100644
--- a/logic/net/NetJob.h
+++ b/logic/net/NetJob.h
@@ -32,7 +32,7 @@ class NetJob : public ProgressProvider
Q_OBJECT
public:
explicit NetJob(QString job_name) : ProgressProvider(), m_job_name(job_name) {};
-
+ virtual ~NetJob() {};
template <typename T> bool addNetAction(T action)
{
NetActionPtr base = std::static_pointer_cast<NetAction>(action);
diff --git a/logic/net/PasteUpload.h b/logic/net/PasteUpload.h
index 83876c17..55cfabf4 100644
--- a/logic/net/PasteUpload.h
+++ b/logic/net/PasteUpload.h
@@ -9,6 +9,7 @@ class PasteUpload : public Task
Q_OBJECT
public:
PasteUpload(QWidget *window, QString text);
+ virtual ~PasteUpload(){};
protected:
virtual void executeTask();