forked from qt-creator/qt-creator
QmlProjectNode: fix coverity warning
Change-Id: I83d2684f4adb9f969824e202da2261b37a699a68 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -61,9 +61,11 @@ bool QmlProjectNode::supportsAction(ProjectAction action, const Node *node) cons
|
|||||||
{
|
{
|
||||||
if (action == AddNewFile || action == EraseFile)
|
if (action == AddNewFile || action == EraseFile)
|
||||||
return true;
|
return true;
|
||||||
|
QTC_ASSERT(node, return false);
|
||||||
|
|
||||||
if (action == Rename && node->nodeType() == NodeType::File) {
|
if (action == Rename && node->nodeType() == NodeType::File) {
|
||||||
const FileNode *fileNode = dynamic_cast<const FileNode *>(node);
|
const FileNode *fileNode = node->asFileNode();
|
||||||
|
QTC_ASSERT(fileNode, return false);
|
||||||
return fileNode->fileType() != FileType::Project;
|
return fileNode->fileType() != FileType::Project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user