summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rw-r--r--src/libs/installer/downloadfiletask.cpp14
2 files changed, 12 insertions, 3 deletions
diff --git a/Changelog b/Changelog
index fd4ad6aa1..526533c98 100644
--- a/Changelog
+++ b/Changelog
@@ -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(