forked from qt-creator/qt-creator
ProjectExplorer: Correct updating targets
A kit may get updated in a way that it now can be used or has more capabilities than before. (e.g. setting or changing the Qt version of a kit) Change-Id: Id4c65fa2d8c334b0ef7d819a70a8df4b6a349a6d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -276,6 +276,7 @@ void TargetSetupWidget::updateDefaultBuildDirectories()
|
|||||||
for (const BuildInfo &buildInfo : buildInfoList(m_kit, m_projectPath)) {
|
for (const BuildInfo &buildInfo : buildInfoList(m_kit, m_projectPath)) {
|
||||||
if (!buildInfo.factory())
|
if (!buildInfo.factory())
|
||||||
continue;
|
continue;
|
||||||
|
bool found = false;
|
||||||
for (BuildInfoStore &buildInfoStore : m_infoStore) {
|
for (BuildInfoStore &buildInfoStore : m_infoStore) {
|
||||||
if (buildInfoStore.buildInfo.typeName == buildInfo.typeName) {
|
if (buildInfoStore.buildInfo.typeName == buildInfo.typeName) {
|
||||||
if (!buildInfoStore.customBuildDir) {
|
if (!buildInfoStore.customBuildDir) {
|
||||||
@@ -283,9 +284,12 @@ void TargetSetupWidget::updateDefaultBuildDirectories()
|
|||||||
buildInfoStore.pathChooser->setFileName(buildInfo.buildDirectory);
|
buildInfoStore.pathChooser->setFileName(buildInfo.buildDirectory);
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
}
|
}
|
||||||
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!found) // the change of the kit may have produced more build information than before
|
||||||
|
addBuildInfo(buildInfo, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user