diff options
author | Daniel Teske <daniel.teske@digia.com> | 2013-12-02 15:30:17 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@digia.com> | 2013-12-03 13:21:01 +0100 |
commit | 8d110837e5203a1d65ecbf8070b5eb02015e5eb9 (patch) | |
tree | c8a201467c57d26c15b69d8e9c6bd5c3bcd37460 /src/plugins/qmlprojectmanager | |
parent | 920d524d386572d5c72cadd472510b67e732bc42 (diff) | |
download | qt-creator-8d110837e5203a1d65ecbf8070b5eb02015e5eb9.tar.gz |
QmlProject: Prevent renaming .qmlproject files
That doesn't work, it doesn't look to hard to fix that, but the use case
for it is rather small anyway.
Task-number: QTCREATORBUG-10934
Change-Id: Idcb1fab96a67330e998590b70760b3c97e4cb780
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/plugins/qmlprojectmanager')
-rw-r--r-- | src/plugins/qmlprojectmanager/qmlprojectnodes.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp index bbf8165091..d35faf01b9 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp @@ -176,7 +176,11 @@ QList<ProjectExplorer::ProjectNode::ProjectAction> QmlProjectNode::supportedActi QList<ProjectAction> actions; actions.append(AddNewFile); actions.append(EraseFile); - actions.append(Rename); + if (node->nodeType() == ProjectExplorer::FileNodeType) { + ProjectExplorer::FileNode *fileNode = static_cast<ProjectExplorer::FileNode *>(node); + if (fileNode->fileType() != ProjectExplorer::ProjectFileType) + actions.append(Rename); + } return actions; } |