Cmake: Don't delete run configurations on switching buildconfigurations

Just disable them, but preserve them. This is different from qmake, but
for qmake we do have different assumptions what a buildconfiguration is.

Task-Nr: QTCREATORBUG-1591
This commit is contained in:
dt
2010-06-09 13:21:08 +02:00
parent 17f8cfe27d
commit 9f86cfaf3c
3 changed files with 29 additions and 5 deletions

View File

@@ -120,6 +120,7 @@ void CMakeTarget::updateRunConfigurations()
foreach (CMakeRunConfiguration *rc, list) {
rc->setExecutable(ct.executable);
rc->setWorkingDirectory(ct.workingDirectory);
rc->setEnabled(true);
}
existingRunConfigurations.remove(ct.title);
} else {
@@ -131,7 +132,10 @@ void CMakeTarget::updateRunConfigurations()
existingRunConfigurations.constBegin();
for( ; it != existingRunConfigurations.constEnd(); ++it) {
CMakeRunConfiguration *rc = it.value();
removeRunConfiguration(rc);
// The executables for those runconfigurations aren't build by the current buildconfiguration
// We just set a disable flag and show that in the display name
rc->setEnabled(false);
// removeRunConfiguration(rc);
}
if (runConfigurations().isEmpty()) {
// Oh no, no run configuration,