QmlProject: Allow files to be deleted / renamed

This might lead to files that 'disappear' from the pane, e.g. when
the suffix is changed to something unsupported.

Reviewed-by: Daniel Teske
Task-number: QTCREATORBUG-2436
This commit is contained in:
Kai Koehne
2010-09-30 11:16:51 +02:00
parent 1c7da3d83c
commit 8500d9ced8

View File

@@ -177,6 +177,8 @@ QList<ProjectExplorer::ProjectNode::ProjectAction> QmlProjectNode::supportedActi
Q_UNUSED(node); Q_UNUSED(node);
QList<ProjectAction> actions; QList<ProjectAction> actions;
actions.append(AddNewFile); actions.append(AddNewFile);
actions.append(EraseFile);
actions.append(Rename);
return actions; return actions;
} }
@@ -213,14 +215,13 @@ bool QmlProjectNode::removeFiles(const ProjectExplorer::FileType /*fileType*/,
bool QmlProjectNode::deleteFiles(const ProjectExplorer::FileType /*fileType*/, bool QmlProjectNode::deleteFiles(const ProjectExplorer::FileType /*fileType*/,
const QStringList & /*filePaths*/) const QStringList & /*filePaths*/)
{ {
return false; return true;
} }
bool QmlProjectNode::renameFile(const ProjectExplorer::FileType /*fileType*/, bool QmlProjectNode::renameFile(const ProjectExplorer::FileType /*fileType*/,
const QString & /*filePath*/, const QString & /*newFilePath*/) const QString & /*filePath*/, const QString & /*newFilePath*/)
{ {
return false; return true;
} }
} // namespace Internal } // namespace Internal