Removed dupliacte code

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-06-25 16:23:50 +03:00
parent d1603f1945
commit fa3a46498f
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -165,21 +165,6 @@ void FlamePackExportTask::collectHashes()
}
}
for (const QFileInfo& file : files) {
const QString relative = gameRoot.relativeFilePath(file.absoluteFilePath());
if (!relative.endsWith(".zip") || !relative.startsWith("resourcepacks/"))
continue;
totalProgres++;
auto hash_task = Hashing::createFlameHasher(file.absoluteFilePath());
connect(hash_task.get(), &Hashing::Hasher::resultsReady, [this, relative, file, totalProgres](QString hash) {
if (m_state == Task::State::Running) {
setProgress(m_progress + 1, totalProgres);
pendingHashes.insert(hash, { relative, file.absoluteFilePath(), true });
}
});
connect(hash_task.get(), &Task::failed, this, &FlamePackExportTask::emitFailed);
hashing_task->addTask(hash_task);
}
connect(hashing_task.get(), &Task::succeeded, this, &FlamePackExportTask::makeApiRequest);
connect(hashing_task.get(), &Task::failed, this, &FlamePackExportTask::emitFailed);
hashing_task->start();