diff options
author | hjk <hjk@qt.io> | 2019-02-26 17:44:56 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-03-01 08:32:14 +0000 |
commit | ad4e2562fa732892b717f76779ca56cc52543f1b (patch) | |
tree | a3a65bb6540f09bf02aa9bc739f2f0a66756271e /src/plugins/qmlprojectmanager/qmlprojectnodes.cpp | |
parent | ce9b3358fb56fa78afc24f5b2f17c544ffbd9b7f (diff) | |
download | qt-creator-ad4e2562fa732892b717f76779ca56cc52543f1b.tar.gz |
ProjectExplorer: Replace Node::setNodeType by virtual functions
Not the usual direction of change, but currently there are
several systems to identify or invoke node functionality.
Virtual functions are likely to stay in this context, so this
here attempts to help consolidation by reducing the influence
of the node type flags, hopefully leading to full removal
by making remaining functionality available through the
other mechanisms (virtual functions, asFooNode() 'casts',
less so the FileType flag).
Change-Id: I12a17ce30b3c8883995b29b4720408020ee0fa3e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlprojectnodes.cpp')
-rw-r--r-- | src/plugins/qmlprojectmanager/qmlprojectnodes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp index 195681aebe..68f3fc2416 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp @@ -64,7 +64,7 @@ bool QmlProjectNode::supportsAction(ProjectAction action, const Node *node) cons return true; QTC_ASSERT(node, return false); - if (action == Rename && node->nodeType() == NodeType::File) { + if (action == Rename && node->isFileNodeType()) { const FileNode *fileNode = node->asFileNode(); QTC_ASSERT(fileNode, return false); return fileNode->fileType() != FileType::Project; |