ProjectExplorer: Make the FlatModel a Utils::TreeModel

The FlatModel is essentially a proxy model keeping expansion and
filter state per ProjectTree(View). Using a Utils::TreeModel makes
it fast enough to allow recreation of the proxy structure on
structural changes simplifying the parent/child logic significantly.

The {Session,Project,Folder,File}Node hierarchy still is still primary
information and shared by all views.

Change-Id: Ic08180a19bda37908280ff30e0737d188ed93e92
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2017-01-19 14:54:23 +01:00
parent 03a68a91bb
commit 3c743346b0
13 changed files with 236 additions and 1063 deletions

View File

@@ -2083,15 +2083,7 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
removeProjectNodes(projectNodes());
removeFolderNodes(folderNodes());
bool changesShowInSimpleTree = showInSimpleTree() ^ showInSimpleTree(result->projectType);
if (changesShowInSimpleTree)
ProjectTree::instance()->emitAboutToChangeShowInSimpleTree(this);
m_projectType = result->projectType;
if (changesShowInSimpleTree)
ProjectTree::instance()->emitShowInSimpleTreeChanged(this);
}
//
@@ -2232,6 +2224,7 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
updateGeneratedFiles(buildDirectory);
cleanupProFileReaders();
ProjectNode::emitTreeChanged();
}
void QmakeProFileNode::cleanupProFileReaders()