diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2019-06-24 09:21:39 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2019-08-15 10:00:37 +0000 |
commit | 55ecbb9660048b06959d471b783a05e4f6b47efd (patch) | |
tree | fdc942d40902f0df0ec769ad3baf8eb8d9749745 /src/libs/installer/metadatajob.cpp | |
parent | 120e527ed16f6c579e46f71c9018ad35ad1cb528 (diff) |
Update repository categories on server authentication request
If repositories in a category were located on a server that requires
user authentication, IFW couldn't update information of the repositories
inside a category during runtime. This prevents for example storing
credentials from the authentication request dialog and blocks the
usage of that category.
Add a method for updating contents in repository categories and a
unit test for the new method. Also some minor tweaks to relevant
bits of code.
Task-number: QTIFW-1358
Change-Id: Idfa2559df6d0d2a6de428b8d5fb1f7672aa1e300
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/metadatajob.cpp')
-rw-r--r-- | src/libs/installer/metadatajob.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/installer/metadatajob.cpp b/src/libs/installer/metadatajob.cpp index ecdf1cd31..7d7b46e72 100644 --- a/src/libs/installer/metadatajob.cpp +++ b/src/libs/installer/metadatajob.cpp @@ -326,6 +326,9 @@ void MetadataJob::xmlTaskFinished() QHash<QString, QPair<Repository, Repository> > update; update.insert(QLatin1String("replace"), qMakePair(original, replacement)); + if (s.updateRepositoryCategories(update) == Settings::UpdatesApplied) + qDebug() << "Repository categories updated."; + if (s.updateDefaultRepositories(update) == Settings::UpdatesApplied || s.updateUserRepositories(update) == Settings::UpdatesApplied) { if (m_core->isMaintainer()) { |