diff options
-rw-r--r-- | Changelog | 1 | ||||
-rw-r--r-- | src/libs/installer/downloadfiletask.cpp | 14 |
2 files changed, 12 insertions, 3 deletions
@@ -2,6 +2,7 @@ - Fix hang in Windows when admin rights needed. (QTIFW-902) - Use deterministic sorting order for components. (QTIFW-833) - Resolve relative URLs from Updates.xml. +- Do not fail to install or update if repository is missing 2.0.4 - Set also display name for Repository action "remove" diff --git a/src/libs/installer/downloadfiletask.cpp b/src/libs/installer/downloadfiletask.cpp index 22212c617..9a065853f 100644 --- a/src/libs/installer/downloadfiletask.cpp +++ b/src/libs/installer/downloadfiletask.cpp @@ -248,10 +248,18 @@ void Downloader::onError(QNetworkReply::NetworkError error) if (reply) { const Data &data = *m_downloads[reply]; + //Do not throw error if Updates.xml not found. The repository might be removed + //with RepositoryUpdate in Updates.xml later. + if (data.taskItem.source().contains(QLatin1String("Updates.xml"), Qt::CaseInsensitive)) { + qDebug() << QString::fromLatin1("Network error while downloading '%1': %2.").arg( + data.taskItem.source(), reply->errorString()); + } else { + m_futureInterface->reportException( + TaskException(tr("Network error while downloading '%1': %2.").arg( + data.taskItem.source(), reply->errorString()))); + } //: %2 is a sentence describing the error - m_futureInterface->reportException( - TaskException(tr("Network error while downloading '%1': %2.").arg( - data.taskItem.source(), reply->errorString()))); + } else { //: %1 is a sentence describing the error m_futureInterface->reportException( |