Commit d45ae70d authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Leandro Melo

Support conversion of pro.shared file from earlier versions

Task-number: QTCREATORBUG-7590
Change-Id: Iae796dd38e7936a32f232ba55fabbc8c7f6ac3c4
Reviewed-by: default avatarLeandro Melo <leandro.melo@nokia.com>
parent 44177392
......@@ -703,22 +703,20 @@ QVariantMap SettingsAccessor::restoreSettings() const
for (int i = sharedSettings.m_version; i < baseFileVersion; ++i)
sharedSettings.m_map = m_handlers.value(i)->update(m_project, sharedSettings.m_map);
if (!settings.isValid()) {
m_project->setProperty(SHARED_SETTINGS, sharedSettings.m_map);
return sharedSettings.m_map;
if (settings.isValid()) {
for (int i = settings.m_version; i < baseFileVersion; ++i)
settings.m_map = m_handlers.value(i)->update(m_project, settings.m_map);
settings.m_version = baseFileVersion;
}
for (int i = settings.m_version; i < baseFileVersion; ++i)
settings.m_map = m_handlers.value(i)->update(m_project, settings.m_map);
settings.m_version = baseFileVersion;
}
}
if (useSharedSettings) {
m_project->setProperty(SHARED_SETTINGS, sharedSettings.m_map);
if (!settings.isValid())
return sharedSettings.m_map;
mergeSharedSettings(&settings.m_map, sharedSettings.m_map);
if (settings.isValid())
mergeSharedSettings(&settings.m_map, sharedSettings.m_map);
else
settings = sharedSettings;
}
}
......
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