Remove customexecutable RCs again if they are unused

This commit is contained in:
Tobias Hunger
2010-03-30 19:14:26 +02:00
parent 176115a0ad
commit 41a91ff9d2
3 changed files with 20 additions and 0 deletions

View File

@@ -999,6 +999,18 @@ void Qt4Project::checkForNewApplicationProjects()
if (!found) {
qt4Target->addRunConfigurationForPath(qt4proFile->path());
}
// Remove unused CustomExecutableRCs:
if (target->runConfigurations().count() > 1) {
QList<RunConfiguration*> toRemove;
foreach (RunConfiguration * rc, target->runConfigurations()) {
CustomExecutableRunConfiguration *cerc = qobject_cast<CustomExecutableRunConfiguration *>(rc);
if (cerc && !cerc->isConfigured())
toRemove.append(rc);
}
foreach (RunConfiguration *rc, toRemove)
target->removeRunConfiguration(rc);
}
}
}
}