forked from qt-creator/qt-creator
ProjectExplorer: Introduce some FolderNode convenience functions
... and use them. Change-Id: I9f5237e5eac30715c2effbd3301dd2a70516d2a9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -121,7 +121,6 @@ ResourceTopLevelNode::~ResourceTopLevelNode()
|
||||
|
||||
void ResourceTopLevelNode::update()
|
||||
{
|
||||
QList<ProjectExplorer::FolderNode *> newPrefixList;
|
||||
QMap<PrefixFolderLang, QList<ProjectExplorer::FileNode *>> filesToAdd;
|
||||
QMap<PrefixFolderLang, QList<ProjectExplorer::FolderNode *>> foldersToAddToFolders;
|
||||
QMap<PrefixFolderLang, QList<ProjectExplorer::FolderNode *>> foldersToAddToPrefix;
|
||||
@@ -139,8 +138,7 @@ void ResourceTopLevelNode::update()
|
||||
PrefixFolderLang prefixId(prefix, QString(), lang);
|
||||
if (!prefixNodes.contains(prefixId)) {
|
||||
ProjectExplorer::FolderNode *fn = new ResourceFolderNode(file.prefix(i), file.lang(i), this);
|
||||
newPrefixList << fn;
|
||||
|
||||
addFolderNode(fn);
|
||||
prefixNodes.insert(prefixId, fn);
|
||||
}
|
||||
ResourceFolderNode *currentPrefixNode = static_cast<ResourceFolderNode*>(prefixNodes[prefixId]);
|
||||
@@ -208,9 +206,6 @@ void ResourceTopLevelNode::update()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
addFolderNodes(newPrefixList);
|
||||
|
||||
foreach (FolderNode *sfn, folderNodes()) {
|
||||
ResourceFolderNode *srn = static_cast<ResourceFolderNode *>(sfn);
|
||||
PrefixFolderLang folderId(srn->prefix(), QString(), srn->lang());
|
||||
|
||||
Reference in New Issue
Block a user