diff --git a/src/plugins/qmljseditor/qmloutlinemodel.cpp b/src/plugins/qmljseditor/qmloutlinemodel.cpp index a004804868c..e07a9f6f0d1 100644 --- a/src/plugins/qmljseditor/qmloutlinemodel.cpp +++ b/src/plugins/qmljseditor/qmloutlinemodel.cpp @@ -367,6 +367,10 @@ void QmlOutlineModel::update(const SemanticInfo &semanticInfo) m_treePos.append(0); m_currentItem = invisibleRootItem(); + // resetModel() actually gives better average performance + // then the incremental updates. + beginResetModel(); + m_typeToIcon.clear(); m_itemToNode.clear(); m_itemToIdNode.clear(); @@ -376,6 +380,8 @@ void QmlOutlineModel::update(const SemanticInfo &semanticInfo) QmlOutlineModelSync syncModel(this); syncModel(m_semanticInfo.document); + endResetModel(); + emit updated(); }