ClassView: improvements of performance for flat tree view

Improved lazy loading mechanism. The main problem here was that
fetchMore function creates children items not only for selected
item but also for children items.
When one changed something in code then whole treeview was rebuilt
(and fetchMore function was called).

Replaced using "contains" and operator[] with 'value'.

Task-number: QTCREATORBUG-8813
Task-number: QTCREATORBUG-8801(partially)
Change-Id: If1ab69a0a67ff828275176ad99c3c63d2a1fa4a2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Przemyslaw Gorszkowski
2013-12-04 13:46:12 +01:00
parent c35ad8c62a
commit fa33294f17
10 changed files with 132 additions and 189 deletions

View File

@@ -297,7 +297,7 @@ void NavigationWidget::fetchExpandedItems(QStandardItem *item, const QStandardIt
return;
const QModelIndex &parent = d->treeModel->indexFromItem(target);
if (d->ui->treeView->isExpanded(parent))
if (d->ui->treeView->isExpanded(parent) && Manager::instance()->canFetchMore(item, true))
Manager::instance()->fetchMore(item, true);
int itemIndex = 0;