forked from qt-creator/qt-creator
CMakePM: Prevent device cmake becoming default
When auto-detecting cmake on device ensure any found cmake will not end up as default cmake as this would update even desktop related kits to use this if they had no cmake configured before. Change-Id: I27960fc1f76d95bd7ddef6bff40f163aa46a610d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -261,7 +261,10 @@ void CMakeToolManager::ensureDefaultCMakeToolIsValid()
|
|||||||
} else {
|
} else {
|
||||||
if (findById(d->m_defaultCMake))
|
if (findById(d->m_defaultCMake))
|
||||||
return;
|
return;
|
||||||
d->m_defaultCMake = d->m_cmakeTools.at(0)->id();
|
auto cmakeTool = Utils::findOrDefault(
|
||||||
|
cmakeTools(), [](CMakeTool *tool){ return tool->detectionSource().isEmpty(); });
|
||||||
|
if (cmakeTool)
|
||||||
|
d->m_defaultCMake = cmakeTool->id();
|
||||||
}
|
}
|
||||||
|
|
||||||
// signaling:
|
// signaling:
|
||||||
|
Reference in New Issue
Block a user