ProjectNodes: Do not define a copy constructor for FileNode

Nodes are QObjects (still), so they should not have a copy constructor.

Change-Id: I1b20663ee0ec121cda4d39ced7a9f204fb4621a1
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2017-05-03 12:20:10 +02:00
parent 9ae5591956
commit 175643fd7e
4 changed files with 12 additions and 3 deletions

View File

@@ -309,7 +309,7 @@ void TeaLeafReader::generateProjectTree(CMakeProjectNode *root, const QList<cons
return Utils::contains(allIncludePaths, [fn](const FileName &inc) { return fn->filePath().isChildOf(inc); });
});
QList<FileNode *> fileNodes = m_files + Utils::transform(missingHeaders, [](const FileNode *fn) { return new FileNode(*fn); });
QList<FileNode *> fileNodes = m_files + Utils::transform(missingHeaders, [](const FileNode *fn) { return fn->clone(); });
root->addNestedNodes(fileNodes, m_parameters.sourceDirectory);
m_files.clear(); // Some of the FileNodes in files() were deleted!