diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-04-21 22:23:31 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-04-21 22:23:31 +0200 |
commit | ab5045b54cc6db3268529d011b38e545630b5114 (patch) | |
tree | ad140f7d1833a1b89831255d374ea225f6728318 /api/logic/minecraft/curse/FileResolvingTask.cpp | |
parent | f3c46dbf11ada91b0da8de506cb5308a7242bb33 (diff) | |
download | MultiMC-ab5045b54cc6db3268529d011b38e545630b5114.tar MultiMC-ab5045b54cc6db3268529d011b38e545630b5114.tar.gz MultiMC-ab5045b54cc6db3268529d011b38e545630b5114.tar.lz MultiMC-ab5045b54cc6db3268529d011b38e545630b5114.tar.xz MultiMC-ab5045b54cc6db3268529d011b38e545630b5114.zip |
NOISSUE finalize curse modpack import work
Diffstat (limited to 'api/logic/minecraft/curse/FileResolvingTask.cpp')
-rw-r--r-- | api/logic/minecraft/curse/FileResolvingTask.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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<Curse::File>& 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; |