ProjectExplorer: Allow to add existing project as sub-project

Implemented only for qmake as of now.

Fixes: QTCREATORBUG-5837
Change-Id: I78f6ce55d6a149a75ae595f7a86d39dc55496819
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-02-19 18:06:10 +01:00
parent 4652a2b1d8
commit 11f989bb93
5 changed files with 68 additions and 2 deletions

View File

@@ -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 || action == RemoveSubProject || action == AddExistingProject)
return true;
break;
default:
@@ -168,6 +168,11 @@ bool QmakePriFileNode::removeSubProject(const QString &proFilePath)
return pri ? pri->removeSubProjects(proFilePath) : false;
}
QStringList QmakePriFileNode::subProjectFileNamePatterns() const
{
return QStringList("*.pro");
}
bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAdded)
{
QmakePriFile *pri = priFile();