From ab5045b54cc6db3268529d011b38e545630b5114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 21 Apr 2017 22:23:31 +0200 Subject: NOISSUE finalize curse modpack import work --- api/logic/minecraft/curse/FileResolvingTask.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'api/logic/minecraft/curse/FileResolvingTask.cpp') diff --git a/api/logic/minecraft/curse/FileResolvingTask.cpp b/api/logic/minecraft/curse/FileResolvingTask.cpp index 13308202..aaac404b 100644 --- a/api/logic/minecraft/curse/FileResolvingTask.cpp +++ b/api/logic/minecraft/curse/FileResolvingTask.cpp @@ -3,17 +3,19 @@ const char * metabase = "https://cursemeta.dries007.net"; -Curse::FileResolvingTask::FileResolvingTask(QVector& toProcess) +Curse::FileResolvingTask::FileResolvingTask(Curse::Manifest& toProcess) : m_toProcess(toProcess) { } void Curse::FileResolvingTask::executeTask() { + setStatus(tr("Resolving curse mod IDs...")); + setProgress(0, m_toProcess.files.size()); m_dljob.reset(new NetJob("Curse file resolver")); - results.resize(m_toProcess.size()); + results.resize(m_toProcess.files.size()); int index = 0; - for(auto & file: m_toProcess) + for(auto & file: m_toProcess.files) { auto projectIdStr = QString::number(file.projectId); auto fileIdStr = QString::number(file.fileId); @@ -42,7 +44,7 @@ void Curse::FileResolvingTask::netJobFinished() failed = true; continue; } - auto & out = m_toProcess[index]; + auto & out = m_toProcess.files[index]; out.fileName = Json::requireString(obj, "FileNameOnDisk"); out.url = Json::requireString(obj, "DownloadURL"); out.resolved = true; -- cgit v1.2.3