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:
@@ -34,6 +34,7 @@
|
||||
#include "classviewsymbolinformation.h"
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QHash>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QStandardItem)
|
||||
|
||||
@@ -74,7 +75,7 @@ public:
|
||||
|
||||
int childCount() const;
|
||||
|
||||
void convertTo(QStandardItem *item, bool recursive = true) const;
|
||||
void convertTo(QStandardItem *item) const;
|
||||
|
||||
// additional properties
|
||||
//! Assigned icon
|
||||
@@ -85,8 +86,6 @@ public:
|
||||
|
||||
void add(const ParserTreeItem::ConstPtr &target);
|
||||
|
||||
void subtract(const ParserTreeItem::ConstPtr &target);
|
||||
|
||||
bool canFetchMore(QStandardItem *item) const;
|
||||
|
||||
void fetchMore(QStandardItem *item) const;
|
||||
@@ -97,6 +96,7 @@ protected:
|
||||
ParserTreeItem &operator=(const ParserTreeItem &other);
|
||||
|
||||
private:
|
||||
typedef QHash<SymbolInformation, ParserTreeItem::Ptr>::const_iterator CitSymbolInformations;
|
||||
//! Private class data pointer
|
||||
ParserTreeItemPrivate *d;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user