Commit afae7d17 authored by Pekka Lundstrom's avatar Pekka Lundstrom

[ssu] changed domain handling logic to always include default-domain. Contributes to JB#4495

parent b7d87345
...@@ -370,17 +370,24 @@ QString Ssu::repoUrl(QString repoName, bool rndRepo, QHash<QString, QString> rep ...@@ -370,17 +370,24 @@ QString Ssu::repoUrl(QString repoName, bool rndRepo, QHash<QString, QString> rep
repoParameters.insert("deviceModel", deviceModel()); repoParameters.insert("deviceModel", deviceModel());
// Domain variables // Domain variables
// first read all variables from default-domain
QStringList defKeys = repoSettings->allKeys();
foreach (const QString &key, defKeys){
repoParameters.insert(key, repoSettings->value(key).toString());
// then overwrite with domain specific things if that block is available
QString domainSection = domain() + "-domain"; QString domainSection = domain() + "-domain";
QStringList sections = repoSettings->childGroups(); QStringList sections = repoSettings->childGroups();
if (sections.contains(domainSection)) if (sections.contains(domainSection)){
repoSettings->beginGroup(domainSection); repoSettings->beginGroup(domainSection);
else QStringList domainKeys = repoSettings->allKeys();
repoSettings->beginGroup("default-domain"); foreach (const QString &key, domainKeys){
QStringList domainKeys = repoSettings->allKeys();
foreach (const QString &key, domainKeys){
repoParameters.insert(key, repoSettings->value(key).toString()); repoParameters.insert(key, repoSettings->value(key).toString());
} }
if (settings->contains("repository-urls/" + repoName)) if (settings->contains("repository-urls/" + repoName))
r = settings->value("repository-urls/" + repoName).toString(); r = settings->value("repository-urls/" + repoName).toString();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment