FlatModel: The simplified tree did not react to hasBuildTarget changes

Task-Nr: QTCREATORBUG-3014
Task-Nr: QTCREATORBUG-2821
This commit is contained in:
dt
2010-11-18 17:31:30 +01:00
parent 1b1da8ae36
commit bdc0e29241
6 changed files with 67 additions and 2 deletions

View File

@@ -1296,7 +1296,12 @@ void Qt4ProFileNode::buildStateChanged(ProjectExplorer::Project *project)
bool Qt4ProFileNode::hasBuildTargets() const
{
return (projectType() == ApplicationTemplate) || (projectType() == LibraryTemplate);
return hasBuildTargets(projectType());
}
bool Qt4ProFileNode::hasBuildTargets(Qt4ProjectType projectType) const
{
return (projectType == ApplicationTemplate || projectType == LibraryTemplate);
}
Qt4ProjectType Qt4ProFileNode::projectType() const
@@ -1476,7 +1481,16 @@ void Qt4ProFileNode::applyEvaluate(bool parseResult, bool async)
Qt4ProjectType oldType = m_projectType;
// probably all subfiles/projects have changed anyway ...
clear();
bool changesHasBuildTargets = hasBuildTargets() xor hasBuildTargets(projectType);
if (changesHasBuildTargets)
aboutToChangeHasBuildTargets();
m_projectType = projectType;
if (changesHasBuildTargets)
hasBuildTargetsChanged();
// really emit here? or at the end? Nobody is connected to this signal at the moment
// so we kind of can ignore that question for now
foreach (NodesWatcher *watcher, watchers())