CMake: Add initial fileapireader class

Change-Id: I620cba7cc1c2a5ac56789fa9770dce573c6b19cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2019-06-13 14:24:04 +02:00
parent f02fcaf02c
commit a95eb53d3b
20 changed files with 2296 additions and 50 deletions

View File

@@ -36,6 +36,16 @@ using namespace ProjectExplorer;
namespace CMakeProjectManager {
namespace Internal {
std::unique_ptr<FolderNode> createCMakeVFolder(const Utils::FilePath &basePath,
int priority,
const QString &displayName)
{
auto newFolder = std::make_unique<VirtualFolderNode>(basePath);
newFolder->setPriority(priority);
newFolder->setDisplayName(displayName);
return std::move(newFolder);
}
void addCMakeVFolder(FolderNode *base,
const Utils::FilePath &basePath,
int priority,
@@ -46,9 +56,7 @@ void addCMakeVFolder(FolderNode *base,
return;
FolderNode *folder = base;
if (!displayName.isEmpty()) {
auto newFolder = std::make_unique<VirtualFolderNode>(basePath);
newFolder->setPriority(priority);
newFolder->setDisplayName(displayName);
auto newFolder = createCMakeVFolder(basePath, priority, displayName);
folder = newFolder.get();
base->addNode(std::move(newFolder));
}
@@ -166,7 +174,7 @@ CMakeTargetNode *createTargetNode(const QHash<Utils::FilePath, ProjectNode *> &c
}
void addHeaderNodes(ProjectNode *root,
const QList<FileNode *> knownHeaders,
const QVector<FileNode *> knownHeaders,
const QList<const FileNode *> &allFiles)
{
if (root->isEmpty())