forked from qt-creator/qt-creator
ProjectExplorer: Drop KitAspect::defaultValue()
The functionality of this function overlapped with KitAspect::setup(),
leading to unclear responsibilities and resulting in bugs such as the
one fixed by 776d54e435.
Therefore, we drop the defaultValue() function, merging its
implementation with setup() where applicable.
Change-Id: Iefa9c3df8b76e97ddf9ad388516621f7ea6558d4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -245,12 +245,6 @@ void CMakeKitAspect::setCMakeTool(Kit *k, const Core::Id id)
|
||||
k->setValue(TOOL_ID, toSet.toSetting());
|
||||
}
|
||||
|
||||
QVariant CMakeKitAspect::defaultValue(const Kit *k) const
|
||||
{
|
||||
const Core::Id id = k ? defaultCMakeToolId() : Core::Id();
|
||||
return id.toSetting();
|
||||
}
|
||||
|
||||
QList<Task> CMakeKitAspect::validate(const Kit *k) const
|
||||
{
|
||||
QList<Task> result;
|
||||
@@ -275,8 +269,7 @@ void CMakeKitAspect::setup(Kit *k)
|
||||
|
||||
void CMakeKitAspect::fix(Kit *k)
|
||||
{
|
||||
if (!CMakeKitAspect::cmakeTool(k))
|
||||
setup(k);
|
||||
setup(k);
|
||||
}
|
||||
|
||||
KitAspect::ItemList CMakeKitAspect::toUserOutput(const Kit *k) const
|
||||
|
||||
Reference in New Issue
Block a user