forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/9.0'
Conflicts: src/plugins/cppeditor/cppeditorplugin.cpp src/plugins/docker/dockerdevice.cpp Change-Id: I41747ff9490e4ab20340d4d4acb4655100aaa3d2
This commit is contained in:
@@ -1623,10 +1623,24 @@ bool CMakeBuildConfiguration::fromMap(const QVariantMap &map)
|
||||
m_buildSystem->setInitialCMakeArguments(cmd.splitArguments());
|
||||
}
|
||||
|
||||
d->m_clearSystemConfigureEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY))
|
||||
.toBool();
|
||||
// Upgrading from Qt Creator version <9 to 9, if the build environment is set
|
||||
// apply the specific values to the configure environment
|
||||
auto settingsKey = [map](const QLatin1String &configureKey, const QLatin1String &buildKey) {
|
||||
if (!map.contains(configureKey) && map.contains(buildKey))
|
||||
return buildKey;
|
||||
return configureKey;
|
||||
};
|
||||
|
||||
const QLatin1String clearSystemEnvironmentKey
|
||||
= settingsKey(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY),
|
||||
QLatin1String(ProjectExplorer::Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY));
|
||||
const QLatin1String userEnvironmentChangesKey
|
||||
= settingsKey(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY),
|
||||
QLatin1String(ProjectExplorer::Constants::USER_ENVIRONMENT_CHANGES_KEY));
|
||||
|
||||
d->m_clearSystemConfigureEnvironment = map.value(clearSystemEnvironmentKey).toBool();
|
||||
d->m_userConfigureEnvironmentChanges = EnvironmentItem::fromStringList(
|
||||
map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
||||
map.value(userEnvironmentChangesKey).toStringList());
|
||||
|
||||
updateAndEmitConfigureEnvironmentChanged();
|
||||
|
||||
|
||||
@@ -96,14 +96,24 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP
|
||||
for (const auto &p : presets)
|
||||
presetsHash.insert(p.name, p);
|
||||
|
||||
auto resolveInherits = [](const auto &presetsHash, auto &presetsList) {
|
||||
auto resolveInherits = [](auto &presetsHash, auto &presetsList) {
|
||||
Utils::sort(presetsList, [](const auto &left, const auto &right) {
|
||||
if (left.inherits) {
|
||||
if (left.inherits.value().contains(right.name))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
for (auto &p : presetsList) {
|
||||
if (!p.inherits)
|
||||
continue;
|
||||
|
||||
for (const QString &inheritFromName : p.inherits.value())
|
||||
if (presetsHash.contains(inheritFromName))
|
||||
for (const QString &inheritFromName : p.inherits.value()) {
|
||||
if (presetsHash.contains(inheritFromName)) {
|
||||
p.inheritFrom(presetsHash[inheritFromName]);
|
||||
presetsHash[p.name] = p;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user