forked from qt-creator/qt-creator
CMakePM: Fix presets transitive inheritance
Fixes: QTCREATORBUG-29076 Change-Id: Ibe4c3eebb3fcebeabafc485949a19e696ecad2de Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -100,7 +100,9 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP
|
||||
Utils::sort(presetsList, [](const auto &left, const auto &right) {
|
||||
const bool sameInheritance = left.inherits && right.inherits
|
||||
&& left.inherits.value() == right.inherits.value();
|
||||
if (!left.inherits || left.inherits.value().contains(right.name) || sameInheritance)
|
||||
const bool leftInheritsRight = left.inherits
|
||||
&& left.inherits.value().contains(right.name);
|
||||
if ((left.inherits && !right.inherits) || leftInheritsRight || sameInheritance)
|
||||
return false;
|
||||
return true;
|
||||
});
|
||||
|
Reference in New Issue
Block a user