summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/minecraft/legacy')
-rw-r--r--api/logic/minecraft/legacy/LwjglVersionList.cpp5
-rw-r--r--api/logic/minecraft/legacy/LwjglVersionList.h4
2 files changed, 6 insertions, 3 deletions
diff --git a/api/logic/minecraft/legacy/LwjglVersionList.cpp b/api/logic/minecraft/legacy/LwjglVersionList.cpp
index 7f4e7b38..3d7ad2d4 100644
--- a/api/logic/minecraft/legacy/LwjglVersionList.cpp
+++ b/api/logic/minecraft/legacy/LwjglVersionList.cpp
@@ -99,6 +99,7 @@ inline QDomElement getDomElementByTagName(QDomElement parent, QString tagname)
void LWJGLVersionList::rssFailed(const QString& reason)
{
+ m_rssDLJob.reset();
m_loading = false;
qWarning() << "Failed to load LWJGL list. Network error: " + reason;
}
@@ -116,8 +117,9 @@ void LWJGLVersionList::rssSucceeded()
if (!doc.setContent(m_rssData, false, &xmlErrorMsg, &errorLine))
{
qWarning() << "Failed to load LWJGL list. XML error: " + xmlErrorMsg + " at line " + QString::number(errorLine);
- m_loading = false;
+ m_rssDLJob.reset();
m_rssData.clear();
+ m_loading = false;
return;
}
m_rssData.clear();
@@ -162,5 +164,6 @@ void LWJGLVersionList::rssSucceeded()
endResetModel();
qDebug() << "Loaded LWJGL list.";
+ m_rssDLJob.reset();
m_loading = false;
}
diff --git a/api/logic/minecraft/legacy/LwjglVersionList.h b/api/logic/minecraft/legacy/LwjglVersionList.h
index 652a3fda..f5312e2c 100644
--- a/api/logic/minecraft/legacy/LwjglVersionList.h
+++ b/api/logic/minecraft/legacy/LwjglVersionList.h
@@ -78,9 +78,9 @@ public:
return m_vlist[i];
}
- virtual Task* getLoadTask() override
+ virtual shared_qobject_ptr<Task> getLoadTask() override
{
- return nullptr;
+ return m_rssDLJob;
}
virtual void sortVersions() override {};