forked from qt-creator/qt-creator
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:
@@ -200,9 +200,9 @@ Manager *Manager::instance()
|
||||
Checks \a item for lazy data population of a QStandardItemModel.
|
||||
*/
|
||||
|
||||
bool Manager::canFetchMore(QStandardItem *item) const
|
||||
bool Manager::canFetchMore(QStandardItem *item, bool skipRoot) const
|
||||
{
|
||||
return d->parser.canFetchMore(item);
|
||||
return d->parser.canFetchMore(item, skipRoot);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -215,6 +215,11 @@ void Manager::fetchMore(QStandardItem *item, bool skipRoot)
|
||||
d->parser.fetchMore(item, skipRoot);
|
||||
}
|
||||
|
||||
bool Manager::hasChildren(QStandardItem *item) const
|
||||
{
|
||||
return d->parser.hasChildren(item);
|
||||
}
|
||||
|
||||
void Manager::initialize()
|
||||
{
|
||||
// use Qt::QueuedConnection everywhere
|
||||
|
||||
Reference in New Issue
Block a user