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
repoParameters.insert("deviceModel", deviceModel());
// Domain variables
// first read all variables from default-domain
repoSettings->beginGroup("default-domain");
QStringList defKeys = repoSettings->allKeys();
foreach (const QString &key, defKeys){
repoParameters.insert(key, repoSettings->value(key).toString());
}
repoSettings->endGroup();
// then overwrite with domain specific things if that block is available
QString domainSection = domain() + "-domain";
QStringList sections = repoSettings->childGroups();
if (sections.contains(domainSection))
if (sections.contains(domainSection)){
repoSettings->beginGroup(domainSection);
else
repoSettings->beginGroup("default-domain");
QStringList domainKeys = repoSettings->allKeys();
foreach (const QString &key, domainKeys){
repoParameters.insert(key, repoSettings->value(key).toString());
}
repoSettings->endGroup();
}
if (settings->contains("repository-urls/" + repoName))
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