ProjectExplorer: Fix infinite recursion

If some ProjectNode doesn't override supportsAction (like CMake), then the
fallback is FolderNode, which calls the root project node again...

Change-Id: Ie7a469d6aaaae38c8c2ff56e33fed27cf1477b49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2017-04-06 23:42:17 +03:00
committed by Tobias Hunger
parent d186d85bcf
commit b1180280d0
2 changed files with 6 additions and 0 deletions

View File

@@ -773,6 +773,11 @@ bool ProjectNode::renameFile(const QString &filePath, const QString &newFilePath
return false;
}
bool ProjectNode::supportsAction(ProjectAction, Node *) const
{
return false;
}
bool ProjectNode::deploysFolder(const QString &folder) const
{
Q_UNUSED(folder);

View File

@@ -291,6 +291,7 @@ public:
bool deleteFiles(const QStringList &filePaths) override;
bool canRenameFile(const QString &filePath, const QString &newFilePath) override;
bool renameFile(const QString &filePath, const QString &newFilePath) override;
bool supportsAction(ProjectAction action, Node *node) const override;
// by default returns false
virtual bool deploysFolder(const QString &folder) const;