MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / remoteLoadSucceeded

Method remoteLoadSucceeded

launcher/minecraft/ComponentUpdateTask.cpp:706–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706void ComponentUpdateTask::remoteLoadSucceeded(size_t taskIndex)
707{
708 if (static_cast<size_t>(d->remoteLoadStatusList.size()) < taskIndex) {
709 qCWarning(instanceProfileResolveC) << "Got task index outside of results" << taskIndex;
710 return;
711 }
712 auto& taskSlot = d->remoteLoadStatusList[taskIndex];
713 disconnect(taskSlot.task.get(), &Task::succeeded, this, nullptr);
714 disconnect(taskSlot.task.get(), &Task::failed, this, nullptr);
715 disconnect(taskSlot.task.get(), &Task::aborted, this, nullptr);
716 if (taskSlot.finished) {
717 qCWarning(instanceProfileResolveC) << "Got multiple results from remote load task" << taskIndex;
718 return;
719 }
720 qCDebug(instanceProfileResolveC) << "Remote task" << taskIndex << "succeeded";
721 taskSlot.succeeded = false;
722 taskSlot.finished = true;
723 d->remoteTasksInProgress--;
724 // update the cached data of the component from the downloaded version file.
725 if (taskSlot.type == RemoteLoadStatus::Type::Version) {
726 auto component = d->m_profile->getComponent(taskSlot.PackProfileIndex);
727 component->m_loaded = true;
728 component->updateCachedData();
729 }
730 checkIfAllFinished();
731}
732
733void ComponentUpdateTask::remoteLoadFailed(size_t taskIndex, const QString& msg)
734{

Callers

nothing calls this directly

Calls 4

getComponentMethod · 0.80
updateCachedDataMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected