ProjectExplorer: Merge Node::isFileNodeType and asFileNode

They were identifying the same set of nodes.

Change-Id: I3316cbc434ff740547bcf0baf9e5f1544f6e3f56
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-02-28 17:19:18 +01:00
parent 89c9eed127
commit 729c74379a
14 changed files with 19 additions and 22 deletions

View File

@@ -223,7 +223,7 @@ static bool supportsNodeAction(ProjectAction action, const Node *node)
};
if (action == RemoveFile || action == Rename) {
if (node->isFileNodeType())
if (node->asFileNode())
return !Utils::contains(project->qbsProject().buildSystemFiles(), equalsNodeFilePath);
}

View File

@@ -286,7 +286,7 @@ void QbsProjectManagerPlugin::updateContextActions()
&& project && !project->isParsing()
&& node && node->isEnabled();
const bool isFile = project && node && node->isFileNodeType();
const bool isFile = project && node && node->asFileNode();
const bool isProduct = project && node && dynamic_cast<const QbsProductNode *>(node);
const auto subproject = dynamic_cast<const QbsProjectNode *>(node);
bool isSubproject = project && subproject && subproject != project->rootProjectNode();