| 704 | } |
| 705 | |
| 706 | void 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 | |
| 733 | void ComponentUpdateTask::remoteLoadFailed(size_t taskIndex, const QString& msg) |
| 734 | { |
nothing calls this directly
no test coverage detected