forked from qt-creator/qt-creator
ProjectExplorer: Fix "Remove subproject" functionality
This was completely broken: Both The qmake-specific logic for enabling the menu item and the generic code executing the action operated on the wrong nodes. Change-Id: Ic6af6f87999dfd3b939f185312be944750b21fa9 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -132,7 +132,7 @@ bool QmakePriFileNode::supportsAction(ProjectAction action, const Node *node) co
|
||||
break;
|
||||
}
|
||||
case ProjectType::SubDirsTemplate:
|
||||
if (action == AddSubProject || action == RemoveSubProject)
|
||||
if (action == AddSubProject)
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
@@ -347,6 +347,13 @@ bool QmakeProFileNode::includedInExactParse() const
|
||||
return pro && pro->includedInExactParse();
|
||||
}
|
||||
|
||||
bool QmakeProFileNode::supportsAction(ProjectAction action, const Node *node) const
|
||||
{
|
||||
if (action == RemoveSubProject)
|
||||
return parentProjectNode() && !parentProjectNode()->asContainerNode();
|
||||
return QmakePriFileNode::supportsAction(action, node);
|
||||
}
|
||||
|
||||
FolderNode::AddNewInformation QmakeProFileNode::addNewInformation(const QStringList &files, Node *context) const
|
||||
{
|
||||
Q_UNUSED(files)
|
||||
|
||||
Reference in New Issue
Block a user