Commit 67e011ba authored by Tobias Hunger's avatar Tobias Hunger
Browse files

ProjectExplorer: Make naming of methods on Nodes more consistent



Change-Id: I5050a020f0fc0ef4556db1d2020afeadfcd51585
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent b782b98f
......@@ -718,7 +718,7 @@ QStringList Parser::projectNodeFileList(const FolderNode *node) const
return list;
QList<FileNode *> fileNodes = node->fileNodes();
QList<FolderNode *> subFolderNodes = node->subFolderNodes();
QList<FolderNode *> subFolderNodes = node->folderNodes();
foreach (const FileNode *file, fileNodes) {
if (file->isGenerated())
......@@ -768,7 +768,7 @@ QStringList Parser::addProjectNode(const ParserTreeItem::Ptr &item, const Projec
}
// subnodes
QList<ProjectNode *> projectNodes = node->subProjectNodes();
QList<ProjectNode *> projectNodes = node->projectNodes();
foreach (const ProjectNode *project, projectNodes) {
ParserTreeItem::Ptr itemPrj(new ParserTreeItem());
......@@ -804,7 +804,7 @@ QStringList Parser::getAllFiles(const ProjectNode *node)
d->cachedPrjFileLists[nodePath] = fileList;
}
// subnodes
QList<ProjectNode *> projectNodes = node->subProjectNodes();
QList<ProjectNode *> projectNodes = node->projectNodes();
foreach (const ProjectNode *project, projectNodes)
fileList += getAllFiles(project);
......
......@@ -296,7 +296,7 @@ void UpdateIncludeDependenciesVisitor::collectElementPaths(const ProjectExplorer
QStringList elementsPath = qmt::NameController::buildElementsPath(nodePath, false);
filePathsMap->insertMulti(elementName, Node(fileNode->filePath().toString(), elementsPath));
}
foreach (const ProjectExplorer::FolderNode *subNode, folderNode->subFolderNodes())
foreach (const ProjectExplorer::FolderNode *subNode, folderNode->folderNodes())
collectElementPaths(subNode, filePathsMap);
}
......@@ -419,7 +419,7 @@ void ComponentViewController::createComponentModel(const ProjectExplorer::Folder
}
}
foreach (const ProjectExplorer::FolderNode *subNode, folderNode->subFolderNodes())
foreach (const ProjectExplorer::FolderNode *subNode, folderNode->folderNodes())
createComponentModel(subNode, diagram, anchorFolder);
}
......
......@@ -456,7 +456,7 @@ QString ModelIndexer::findFirstModel(ProjectExplorer::FolderNode *folderNode)
if (mimeType.name() == QLatin1String(Constants::MIME_TYPE_MODEL))
return fileNode->filePath().toString();
}
foreach (ProjectExplorer::FolderNode *subFolderNode, folderNode->subFolderNodes()) {
foreach (ProjectExplorer::FolderNode *subFolderNode, folderNode->folderNodes()) {
QString modelFileName = findFirstModel(subFolderNode);
if (!modelFileName.isEmpty())
return modelFileName;
......
......@@ -162,7 +162,7 @@ FileNameList NimProject::nimFiles() const
if (file->displayName().endsWith(QLatin1String(".nim")))
result.append(file->filePath());
}
folders.append(folder->subFolderNodes());
folders.append(folder->folderNodes());
}
return result;
......
......@@ -2002,12 +2002,12 @@ static QString pathOrDirectoryFor(Node *node, bool dir)
if (node->nodeType() == NodeType::VirtualFolder && folder) {
// Virtual Folder case
// If there are files directly below or no subfolders, take the folder path
if (!folder->fileNodes().isEmpty() || folder->subFolderNodes().isEmpty()) {
if (!folder->fileNodes().isEmpty() || folder->folderNodes().isEmpty()) {
location = path.toString();
} else {
// Otherwise we figure out a commonPath from the subfolders
QStringList list;
foreach (FolderNode *f, folder->subFolderNodes())
foreach (FolderNode *f, folder->folderNodes())
list << f->filePath().toString() + QLatin1Char('/');
location = Utils::commonPath(list);
}
......
......@@ -383,7 +383,7 @@ bool FlatModel::canFetchMore(const QModelIndex & parent) const
void FlatModel::recursiveAddFolderNodes(FolderNode *startNode, QList<Node *> *list, const QSet<Node *> &blackList) const
{
foreach (FolderNode *folderNode, startNode->subFolderNodes()) {
foreach (FolderNode *folderNode, startNode->folderNodes()) {
if (folderNode && !blackList.contains(folderNode))
recursiveAddFolderNodesImpl(folderNode, list, blackList);
}
......@@ -395,7 +395,7 @@ void FlatModel::recursiveAddFolderNodesImpl(FolderNode *startNode, QList<Node *>
if (!blackList.contains(startNode))
list->append(startNode);
} else {
foreach (FolderNode *folderNode, startNode->subFolderNodes()) {
foreach (FolderNode *folderNode, startNode->folderNodes()) {
if (folderNode && !blackList.contains(folderNode))
recursiveAddFolderNodesImpl(folderNode, list, blackList);
}
......@@ -404,7 +404,7 @@ void FlatModel::recursiveAddFolderNodesImpl(FolderNode *startNode, QList<Node *>
void FlatModel::recursiveAddFileNodes(FolderNode *startNode, QList<Node *> *list, const QSet<Node *> &blackList) const
{
foreach (FolderNode *subFolderNode, startNode->subFolderNodes()) {
foreach (FolderNode *subFolderNode, startNode->folderNodes()) {
if (!blackList.contains(subFolderNode))
recursiveAddFileNodes(subFolderNode, list, blackList);
}
......@@ -852,7 +852,7 @@ void FlatModel::foldersAboutToBeRemoved(FolderNode *parentFolder, const QList<Fo
void FlatModel::removeFromCache(QList<FolderNode *> list)
{
foreach (FolderNode *fn, list) {
removeFromCache(fn->subFolderNodes());
removeFromCache(fn->folderNodes());
m_childNodes.remove(fn);
}
}
......
......@@ -299,7 +299,7 @@ FolderNode::FolderNode(const Utils::FileName &folderPath, NodeType nodeType, con
FolderNode::~FolderNode()
{
qDeleteAll(m_subFolderNodes);
qDeleteAll(m_folderNodes);
qDeleteAll(m_fileNodes);
}
......@@ -334,17 +334,17 @@ QList<FileNode*> FolderNode::fileNodes() const
QList<FileNode *> FolderNode::recursiveFileNodes() const
{
QList<FileNode *> result = fileNodes();
foreach (ProjectExplorer::FolderNode *folder, subFolderNodes())
foreach (ProjectExplorer::FolderNode *folder, folderNodes())
result.append(folder->recursiveFileNodes());
return result;
}
QList<FolderNode*> FolderNode::subFolderNodes() const
QList<FolderNode*> FolderNode::folderNodes() const
{
return m_subFolderNodes;
return m_folderNodes;
}
FolderNode *FolderNode::findOrCreateSubFolderNode(const QString &directory)
FolderNode *FolderNode::findOrCreateFolderNode(const QString &directory)
{
Utils::FileName path = filePath();
QDir parentDir(path.toString());
......@@ -357,7 +357,7 @@ FolderNode *FolderNode::findOrCreateSubFolderNode(const QString &directory)
path.appendPath(part);
// Find folder in subFolders
bool found = false;
foreach (ProjectExplorer::FolderNode *folder, parent->subFolderNodes()) {
foreach (ProjectExplorer::FolderNode *folder, parent->folderNodes()) {
if (folder->filePath() == path) {
// yeah found something :)
parent = folder;
......@@ -397,7 +397,7 @@ void FolderNode::buildTree(QList<FileNode *> &files)
foreach (ProjectExplorer::FileNode *fn, added) {
// Get relative path to rootNode
QString parentDir = fn->filePath().toFileInfo().absolutePath();
ProjectExplorer::FolderNode *folder = findOrCreateSubFolderNode(parentDir);
ProjectExplorer::FolderNode *folder = findOrCreateFolderNode(parentDir);
addedFolderMapping[folder] << fn;
}
......@@ -416,7 +416,7 @@ void FolderNode::buildTree(QList<FileNode *> &files)
continue;
// Check for empty parent
while (parent->subFolderNodes().isEmpty() && parent->fileNodes().isEmpty()) {
while (parent->folderNodes().isEmpty() && parent->fileNodes().isEmpty()) {
ProjectExplorer::FolderNode *grandparent = parent->parentFolderNode();
grandparent->removeFolderNodes(QList<ProjectExplorer::FolderNode *>() << parent);
parent = grandparent;
......@@ -429,7 +429,7 @@ void FolderNode::buildTree(QList<FileNode *> &files)
void FolderNode::accept(NodesVisitor *visitor)
{
visitor->visitFolderNode(this);
foreach (FolderNode *subFolder, m_subFolderNodes)
foreach (FolderNode *subFolder, m_folderNodes)
subFolder->accept(visitor);
}
......@@ -584,14 +584,14 @@ void FolderNode::addFolderNodes(const QList<FolderNode*> &subFolders)
folder->setProjectNode(projectNode());
// Find the correct place to insert
if (m_subFolderNodes.count() == 0
|| m_subFolderNodes.last() < folder) {
if (m_folderNodes.count() == 0
|| m_folderNodes.last() < folder) {
// empty list or greater then last node
m_subFolderNodes.append(folder);
m_folderNodes.append(folder);
} else {
// Binary Search for insertion point
auto it = std::lower_bound(m_subFolderNodes.begin(), m_subFolderNodes.end(), folder);
m_subFolderNodes.insert(it, folder);
auto it = std::lower_bound(m_folderNodes.begin(), m_folderNodes.end(), folder);
m_folderNodes.insert(it, folder);
}
// project nodes have to be added via addProjectNodes
......@@ -621,17 +621,17 @@ void FolderNode::removeFolderNodes(const QList<FolderNode*> &subFolders)
ProjectTree::instance()->emitFoldersAboutToBeRemoved(this, toRemove);
auto toRemoveIter = toRemove.constBegin();
auto folderIter = m_subFolderNodes.begin();
auto folderIter = m_folderNodes.begin();
for (; toRemoveIter != toRemove.constEnd(); ++toRemoveIter) {
QTC_ASSERT((*toRemoveIter)->nodeType() != NodeType::Project,
qDebug("project nodes have to be removed via removeProjectNodes"));
while (*folderIter != *toRemoveIter) {
++folderIter;
QTC_ASSERT(folderIter != m_subFolderNodes.end(),
QTC_ASSERT(folderIter != m_folderNodes.end(),
qDebug("Folder to remove is not part of specified folder!"));
}
delete *folderIter;
folderIter = m_subFolderNodes.erase(folderIter);
folderIter = m_folderNodes.erase(folderIter);
}
ProjectTree::instance()->emitFoldersRemoved(this);
......@@ -700,9 +700,9 @@ QString ProjectNode::vcsTopic() const
return QString();
}
QList<ProjectNode*> ProjectNode::subProjectNodes() const
QList<ProjectNode*> ProjectNode::projectNodes() const
{
return m_subProjectNodes;
return m_projectNodes;
}
bool ProjectNode::canAddSubProject(const QString &proFilePath) const
......@@ -777,7 +777,7 @@ void ProjectNode::accept(NodesVisitor *visitor)
{
visitor->visitProjectNode(this);
foreach (FolderNode *folder, m_subFolderNodes)
foreach (FolderNode *folder, m_folderNodes)
folder->accept(visitor);
}
......@@ -798,11 +798,11 @@ void ProjectNode::addProjectNodes(const QList<ProjectNode*> &subProjects)
QTC_ASSERT(!project->parentFolderNode() || project->parentFolderNode() == this,
qDebug("Project node has already a parent"));
project->setParentFolderNode(this);
m_subFolderNodes.append(project);
m_subProjectNodes.append(project);
m_folderNodes.append(project);
m_projectNodes.append(project);
}
Utils::sort(m_subFolderNodes);
Utils::sort(m_subProjectNodes);
Utils::sort(m_folderNodes);
Utils::sort(m_projectNodes);
ProjectTree::instance()->emitFoldersAdded(this);
}
......@@ -826,22 +826,22 @@ void ProjectNode::removeProjectNodes(const QList<ProjectNode*> &subProjects)
ProjectTree::instance()->emitFoldersAboutToBeRemoved(this, toRemove);
auto toRemoveIter = toRemove.constBegin();
auto folderIter = m_subFolderNodes.begin();
auto projectIter = m_subProjectNodes.begin();
auto folderIter = m_folderNodes.begin();
auto projectIter = m_projectNodes.begin();
for (; toRemoveIter != toRemove.constEnd(); ++toRemoveIter) {
while (*projectIter != *toRemoveIter) {
++projectIter;
QTC_ASSERT(projectIter != m_subProjectNodes.end(),
QTC_ASSERT(projectIter != m_projectNodes.end(),
qDebug("Project to remove is not part of specified folder!"));
}
while (*folderIter != *toRemoveIter) {
++folderIter;
QTC_ASSERT(folderIter != m_subFolderNodes.end(),
QTC_ASSERT(folderIter != m_folderNodes.end(),
qDebug("Project to remove is not part of specified folder!"));
}
delete *projectIter;
projectIter = m_subProjectNodes.erase(projectIter);
folderIter = m_subFolderNodes.erase(folderIter);
projectIter = m_projectNodes.erase(projectIter);
folderIter = m_folderNodes.erase(folderIter);
}
ProjectTree::instance()->emitFoldersRemoved(this);
......@@ -915,11 +915,11 @@ void SessionNode::addProjectNodes(const QList<ProjectNode*> &projectNodes)
QTC_ASSERT(!project->parentFolderNode(),
qDebug("Project node has already a parent folder"));
project->setParentFolderNode(this);
m_subFolderNodes.append(project);
m_folderNodes.append(project);
m_projectNodes.append(project);
}
Utils::sort(m_subFolderNodes);
Utils::sort(m_folderNodes);
Utils::sort(m_projectNodes);
ProjectTree::instance()->emitFoldersAdded(this);
......@@ -938,7 +938,7 @@ void SessionNode::removeProjectNodes(const QList<ProjectNode*> &projectNodes)
ProjectTree::instance()->emitFoldersAboutToBeRemoved(this, toRemove);
auto toRemoveIter = toRemove.constBegin();
auto folderIter = m_subFolderNodes.begin();
auto folderIter = m_folderNodes.begin();
auto projectIter = m_projectNodes.begin();
for (; toRemoveIter != toRemove.constEnd(); ++toRemoveIter) {
while (*projectIter != *toRemoveIter) {
......@@ -948,11 +948,11 @@ void SessionNode::removeProjectNodes(const QList<ProjectNode*> &projectNodes)
}
while (*folderIter != *toRemoveIter) {
++folderIter;
QTC_ASSERT(folderIter != m_subFolderNodes.end(),
QTC_ASSERT(folderIter != m_folderNodes.end(),
qDebug("Project to remove is not part of specified folder!"));
}
projectIter = m_projectNodes.erase(projectIter);
folderIter = m_subFolderNodes.erase(folderIter);
folderIter = m_folderNodes.erase(folderIter);
}
ProjectTree::instance()->emitFoldersRemoved(this);
......
......@@ -185,8 +185,8 @@ public:
QList<FileNode *> fileNodes() const;
QList<FileNode *> recursiveFileNodes() const;
QList<FolderNode *> subFolderNodes() const;
FolderNode *findOrCreateSubFolderNode(const QString &directory);
QList<FolderNode *> folderNodes() const;
FolderNode *findOrCreateFolderNode(const QString &directory);
void buildTree(QList<FileNode *> &files);
virtual void accept(NodesVisitor *visitor);
......@@ -227,7 +227,7 @@ public:
FolderNode *asFolderNode() override;
protected:
QList<FolderNode*> m_subFolderNodes;
QList<FolderNode*> m_folderNodes;
QList<FileNode*> m_fileNodes;
private:
......@@ -255,7 +255,7 @@ public:
QString vcsTopic() const;
// all subFolders that are projects
QList<ProjectNode*> subProjectNodes() const;
QList<ProjectNode*> projectNodes() const;
virtual bool canAddSubProject(const QString &proFilePath) const;
virtual bool addSubProjects(const QStringList &proFilePaths);
......@@ -287,7 +287,7 @@ protected:
explicit ProjectNode(const Utils::FileName &projectFilePath);
private:
QList<ProjectNode*> m_subProjectNodes;
QList<ProjectNode*> m_projectNodes;
// let SessionNode call setParentFolderNode
friend class SessionNode;
......
......@@ -232,7 +232,7 @@ static inline AddNewTree *createNoneNode(BestNodeSelector *selector)
static inline AddNewTree *buildAddProjectTree(ProjectNode *root, const QString &projectPath, Node *contextNode, BestNodeSelector *selector)
{
QList<AddNewTree *> children;
foreach (ProjectNode *pn, root->subProjectNodes()) {
foreach (ProjectNode *pn, root->projectNodes()) {
AddNewTree *child = buildAddProjectTree(pn, projectPath, contextNode, selector);
if (child)
children.append(child);
......@@ -269,7 +269,7 @@ static inline AddNewTree *buildAddFilesTree(FolderNode *root, const QStringList
Node *contextNode, BestNodeSelector *selector)
{
QList<AddNewTree *> children;
foreach (FolderNode *fn, root->subFolderNodes()) {
foreach (FolderNode *fn, root->folderNodes()) {
AddNewTree *child = buildAddFilesTree(fn, files, contextNode, selector);
if (child)
children.append(child);
......
......@@ -475,7 +475,7 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
QList<ProjectExplorer::FileNode *> filesToAdd;
QList<ProjectExplorer::FolderNode *> foldersToRemove;
foreach (ProjectExplorer::FolderNode *fn, root->subFolderNodes()) {
foreach (ProjectExplorer::FolderNode *fn, root->folderNodes()) {
if (fn->nodeType() == ProjectExplorer::NodeType::Project)
continue; // Skip ProjectNodes mixed into the folders...
const auto * const qbsFolder = dynamic_cast<QbsFolderNode *>(fn);
......@@ -511,7 +511,7 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
continue;
} else {
ProjectExplorer::FolderNode *fn = 0;
foreach (ProjectExplorer::FolderNode *f, root->subFolderNodes()) {
foreach (ProjectExplorer::FolderNode *f, root->folderNodes()) {
// There can be one match only here!
if (f->filePath() != path)
continue;
......@@ -682,7 +682,7 @@ void QbsProductNode::setQbsProductData(const qbs::Project &project, const qbs::P
prd.location().line());
QList<ProjectExplorer::ProjectNode *> toAdd;
QList<ProjectExplorer::ProjectNode *> toRemove = subProjectNodes();
QList<ProjectExplorer::ProjectNode *> toRemove = projectNodes();
foreach (const qbs::GroupData &grp, prd.groups()) {
if (grp.name() == prd.name() && grp.location() == prd.location()) {
......@@ -736,7 +736,7 @@ QList<ProjectExplorer::RunConfiguration *> QbsProductNode::runConfigurations() c
QbsGroupNode *QbsProductNode::findGroupNode(const QString &name)
{
foreach (ProjectExplorer::ProjectNode *n, subProjectNodes()) {
foreach (ProjectExplorer::ProjectNode *n, projectNodes()) {
QbsGroupNode *qn = static_cast<QbsGroupNode *>(n);
if (qn->qbsGroupData().name() == name)
return qn;
......@@ -762,7 +762,7 @@ QbsProjectNode::~QbsProjectNode()
void QbsProjectNode::update(const qbs::Project &qbsProject, const qbs::ProjectData &prjData)
{
QList<ProjectExplorer::ProjectNode *> toAdd;
QList<ProjectExplorer::ProjectNode *> toRemove = subProjectNodes();
QList<ProjectExplorer::ProjectNode *> toRemove = projectNodes();
foreach (const qbs::ProjectData &subData, prjData.subProjects()) {
QbsProjectNode *qn = findProjectNode(subData.name());
......@@ -824,7 +824,7 @@ void QbsProjectNode::ctor()
QbsProductNode *QbsProjectNode::findProductNode(const QString &uniqueName)
{
foreach (ProjectExplorer::ProjectNode *n, subProjectNodes()) {
foreach (ProjectExplorer::ProjectNode *n, projectNodes()) {
QbsProductNode *qn = dynamic_cast<QbsProductNode *>(n);
if (qn && QbsProject::uniqueProductName(qn->qbsProductData()) == uniqueName)
return qn;
......@@ -834,7 +834,7 @@ QbsProductNode *QbsProjectNode::findProductNode(const QString &uniqueName)
QbsProjectNode *QbsProjectNode::findProjectNode(const QString &name)
{
foreach (ProjectExplorer::ProjectNode *n, subProjectNodes()) {
foreach (ProjectExplorer::ProjectNode *n, projectNodes()) {
QbsProjectNode *qn = dynamic_cast<QbsProjectNode *>(n);
if (qn && qn->qbsProjectData().name() == name)
return qn;
......
......@@ -447,7 +447,7 @@ struct InternalNode
// updateFolders
QMultiMap<QString, FolderNode *> existingFolderNodes;
foreach (FolderNode *node, folder->subFolderNodes())
foreach (FolderNode *node, folder->folderNodes())
if (node->nodeType() != NodeType::Project && !dynamic_cast<ResourceEditor::ResourceTopLevelNode *>(node))
existingFolderNodes.insert(node->filePath().toString(), node);
......@@ -560,7 +560,7 @@ struct InternalNode
void updateResourceFiles(FolderNode *folder)
{
QList<FolderNode *> existingResourceNodes; // for resource special handling
foreach (FolderNode *folderNode, folder->subFolderNodes()) {
foreach (FolderNode *folderNode, folder->folderNodes()) {
if (ResourceEditor::ResourceTopLevelNode *rn = dynamic_cast<ResourceEditor::ResourceTopLevelNode *>(folderNode))
existingResourceNodes << rn;
}
......@@ -855,7 +855,7 @@ QList<RunConfiguration *> QmakePriFileNode::runConfigurations() const
QList<QmakePriFileNode *> QmakePriFileNode::subProjectNodesExact() const
{
QList<QmakePriFileNode *> nodes;
foreach (ProjectNode *node, subProjectNodes()) {
foreach (ProjectNode *node, projectNodes()) {
QmakePriFileNode *n = dynamic_cast<QmakePriFileNode *>(node);
if (n && n->includedInExactParse())
nodes << n;
......@@ -909,7 +909,7 @@ QList<ProjectAction> QmakePriFileNode::supportedActions(Node *node) const
FolderNode *folder = node->asFolderNode();
if (folder) {
QStringList list;
foreach (FolderNode *f, folder->subFolderNodes())
foreach (FolderNode *f, folder->folderNodes())
list << f->filePath().toString() + QLatin1Char('/');
if (deploysFolder(Utils::commonPath(list)))
addExistingFiles = false;
......@@ -1543,7 +1543,7 @@ QmakeProFileNode *QmakeProFileNode::findProFileFor(const FileName &fileName) con
{
if (fileName == filePath())
return const_cast<QmakeProFileNode *>(this);
foreach (ProjectNode *pn, subProjectNodes())
foreach (ProjectNode *pn, projectNodes())
if (QmakeProFileNode *qmakeProFileNode = dynamic_cast<QmakeProFileNode *>(pn))
if (QmakeProFileNode *result = qmakeProFileNode->findProFileFor(fileName))
return result;
......@@ -1677,7 +1677,7 @@ void QmakeProFileNode::emitProFileUpdatedRecursive()
{
emit m_project->proFileUpdated(this, m_validParse, m_parseInProgress);
foreach (ProjectNode *subNode, subProjectNodes()) {
foreach (ProjectNode *subNode, projectNodes()) {
if (QmakeProFileNode *node = dynamic_cast<QmakeProFileNode *>(subNode))
node->emitProFileUpdatedRecursive();
}
......@@ -1686,7 +1686,7 @@ void QmakeProFileNode::emitProFileUpdatedRecursive()
void QmakeProFileNode::setParseInProgressRecursive(bool b)
{
setParseInProgress(b);
foreach (ProjectNode *subNode, subProjectNodes()) {
foreach (ProjectNode *subNode, projectNodes()) {
if (QmakeProFileNode *node = dynamic_cast<QmakeProFileNode *>(subNode))
node->setParseInProgressRecursive(b);
}
......@@ -1703,7 +1703,7 @@ void QmakeProFileNode::setParseInProgress(bool b)
void QmakeProFileNode::setValidParseRecursive(bool b)
{
setValidParse(b);
foreach (ProjectNode *subNode, subProjectNodes()) {
foreach (ProjectNode *subNode, projectNodes()) {
if (QmakeProFileNode *node = dynamic_cast<QmakeProFileNode *>(subNode))
node->setValidParseRecursive(b);
}
......@@ -2062,8 +2062,8 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
// delete files && folders && projects
removeFileNodes(fileNodes());
removeProjectNodes(subProjectNodes());
removeFolderNodes(subFolderNodes());
removeProjectNodes(projectNodes());
removeFolderNodes(folderNodes());
m_projectType = InvalidProject;
}
......@@ -2076,7 +2076,7 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
if (result->projectType != m_projectType) {
// probably all subfiles/projects have changed anyway
// delete files && folders && projects
foreach (ProjectNode *projectNode, subProjectNodes()) {
foreach (ProjectNode *projectNode, projectNodes()) {
if (QmakeProFileNode *qmakeProFileNode = dynamic_cast<QmakeProFileNode *>(projectNode)) {
qmakeProFileNode->setValidParseRecursive(false);
qmakeProFileNode->setParseInProgressRecursive(false);
......@@ -2084,8 +2084,8 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
}
removeFileNodes(fileNodes());
removeProjectNodes(subProjectNodes());
removeFolderNodes(subFolderNodes());
removeProjectNodes(projectNodes());
removeFolderNodes(folderNodes());
bool changesShowInSimpleTree = showInSimpleTree() ^ showInSimpleTree(result->projectType);
......@@ -2114,7 +2114,7 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
IncludedPriFile *tree = toCompare.first().second;
toCompare.pop_front();
QList<ProjectNode*> existingProjectNodes = pn->subProjectNodes();
QList<ProjectNode*> existingProjectNodes = pn->projectNodes();
Utils::sort(existingProjectNodes, sortByPath);
// result is already sorted
......
......@@ -840,7 +840,7 @@ static FolderNode *folderOf(FolderNode *in, const FileName &fileName)
foreach (FileNode *fn, in->fileNodes())
if (fn->filePath() == fileName)
return in;
foreach (FolderNode *folder, in->subFolderNodes())
foreach (FolderNode *folder, in->folderNodes())
if (FolderNode *pn = folderOf(folder, fileName))
return pn;
return 0;
......@@ -1002,7 +1002,7 @@ void QmakeProject::collectAllProFiles(QList<QmakeProFileNode *> &list, QmakeProF
if (parse == ExactAndCumulativeParse || node->includedInExactParse())
if (projectTypes.isEmpty() || projectTypes.contains(node->projectType()))
list.append(node);
foreach (ProjectNode *n, node->subProjectNodes()) {
foreach (ProjectNode *n, node->projectNodes()) {
QmakeProFileNode *qmakeProFileNode = dynamic_cast<QmakeProFileNode *>(n);
if (qmakeProFileNode)
collectAllProFiles(list, qmakeProFileNode, parse, projectTypes);
......@@ -1075,7 +1075,7 @@ bool QmakeProject::hasSubNode(QmakePriFileNode *root, const FileName &path)
{
if (root->filePath() == path)
return true;
foreach (FolderNode *fn, root->subFolderNodes()) {
foreach (FolderNode *fn, root->folderNodes()) {
if (dynamic_cast<QmakeProFileNode *>(fn)) {
// we aren't interested in pro file nodes
} else if (QmakePriFileNode *qt4prifilenode = dynamic_cast<QmakePriFileNode *>(fn)) {
......@@ -1091,7 +1091,7 @@ void QmakeProject::findProFile(const FileName &fileName, QmakeProFileNode *root,
if (hasSubNode(root, fileName))
list.append(root);
foreach (FolderNode *fn, root->subFolderNodes())
foreach (FolderNode *fn, root->folderNodes())
if (QmakeProFileNode *qt4proFileNode = dynamic_cast<QmakeProFileNode *>(fn))
findProFile(fileName, qt4proFileNode, list);
}
......
......@@ -387,8 +387,8 @@ void DocumentManager::findPathToIsoProFile(bool *iconResourceFileAlreadyExists,
if (node->nodeType() == ProjectExplorer::NodeType::VirtualFolder && node->displayName() == "Resources") {
ProjectExplorer::VirtualFolderNode *virtualFolderNode = dynamic_cast<ProjectExplorer::VirtualFolderNode*>(node);
for (int subFolderIndex = 0; subFolderIndex < virtualFolderNode->subFolderNodes().size() && !iconQrcFileNode; ++subFolderIndex) {
ProjectExplorer::FolderNode *subFolderNode = virtualFolderNode->subFolderNodes().at(subFolderIndex);
for (int subFolderIndex = 0; subFolderIndex < virtualFolderNode->