forked from qt-creator/qt-creator
ProjectExplorer: Make "Add New File" work on FolderNodes
The ResoureceNode will be a folder node, this enables that to work for add new file. Change-Id: Ifb4827d0900ce550be164c44979c5b72ab947c42 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -180,7 +180,9 @@ bool Node::isEnabled() const
|
||||
|
||||
QList<ProjectAction> Node::supportedActions(Node *node) const
|
||||
{
|
||||
return parentFolderNode()->supportedActions(node);
|
||||
QList<ProjectAction> list = parentFolderNode()->supportedActions(node);
|
||||
list.append(ProjectExplorer::InheritedFromParent);
|
||||
return list;
|
||||
}
|
||||
|
||||
void Node::setNodeType(NodeType type)
|
||||
@@ -357,6 +359,12 @@ bool FolderNode::renameFile(const QString &filePath, const QString &newFilePath)
|
||||
return false;
|
||||
}
|
||||
|
||||
FolderNode::AddNewInformation FolderNode::addNewInformation(const QStringList &files) const
|
||||
{
|
||||
Q_UNUSED(files);
|
||||
return AddNewInformation(QFileInfo(path()).fileName(), 100);
|
||||
}
|
||||
|
||||
/*!
|
||||
Adds file nodes specified by \a files to the internal list of the folder
|
||||
and emits the corresponding signals from the projectNode.
|
||||
|
||||
Reference in New Issue
Block a user