Improve the message when component metadata fails to download
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
f19fe41937
commit
8711913ac3
2 changed files with 3 additions and 3 deletions
|
@ -748,7 +748,6 @@ void ComponentUpdateTask::remoteLoadFailed(size_t taskIndex, const QString& msg)
|
||||||
d->remoteLoadSuccessful = false;
|
d->remoteLoadSuccessful = false;
|
||||||
taskSlot.succeeded = false;
|
taskSlot.succeeded = false;
|
||||||
taskSlot.finished = true;
|
taskSlot.finished = true;
|
||||||
taskSlot.error = msg;
|
|
||||||
d->remoteTasksInProgress--;
|
d->remoteTasksInProgress--;
|
||||||
checkIfAllFinished();
|
checkIfAllFinished();
|
||||||
}
|
}
|
||||||
|
@ -769,7 +768,9 @@ void ComponentUpdateTask::checkIfAllFinished()
|
||||||
QStringList allErrorsList;
|
QStringList allErrorsList;
|
||||||
for (auto& item : d->remoteLoadStatusList) {
|
for (auto& item : d->remoteLoadStatusList) {
|
||||||
if (!item.succeeded) {
|
if (!item.succeeded) {
|
||||||
allErrorsList.append(item.error);
|
const ComponentPtr component = d->m_profile->getComponent(item.PackProfileIndex);
|
||||||
|
allErrorsList.append(tr("Could not download metadata for %1 %2. Please change the version or try again later.")
|
||||||
|
.arg(component->getName(), component->m_version));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto allErrors = allErrorsList.join("\n");
|
auto allErrors = allErrorsList.join("\n");
|
||||||
|
|
|
@ -15,7 +15,6 @@ struct RemoteLoadStatus {
|
||||||
size_t PackProfileIndex = 0;
|
size_t PackProfileIndex = 0;
|
||||||
bool finished = false;
|
bool finished = false;
|
||||||
bool succeeded = false;
|
bool succeeded = false;
|
||||||
QString error;
|
|
||||||
Task::Ptr task;
|
Task::Ptr task;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue