Commit ffbc3311 authored by Tobias Hunger's avatar Tobias Hunger

ProjectExplorer: Use makeEmpty in FolderNode::buildTree

Some lines saved.

Change-Id: I5a5e2bb150070aae48ad0ec1abb08bc2532d093b
Reviewed-by: default avatarhjk <hjk@qt.io>
parent bd8fe1c4
......@@ -422,10 +422,7 @@ FolderNode *FolderNode::recursiveFindOrCreateFolderNode(const QString &directory
void FolderNode::buildTree(QList<FileNode *> &files, const Utils::FileName &overrideBaseDir)
{
qDeleteAll(m_fileNodes);
m_fileNodes.clear();
qDeleteAll(m_folderNodes);
m_folderNodes.clear();
makeEmpty();
foreach (ProjectExplorer::FileNode *fn, files) {
// Get relative path to rootNode
......@@ -433,6 +430,8 @@ void FolderNode::buildTree(QList<FileNode *> &files, const Utils::FileName &over
ProjectExplorer::FolderNode *folder = recursiveFindOrCreateFolderNode(parentDir, overrideBaseDir);
folder->addFileNode(fn);
}
emitTreeChanged();
}
void FolderNode::accept(NodesVisitor *visitor)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment