summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-09-09 16:50:45 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-10-28 12:40:02 +0300
commit3ad787d0dd580a8cfb37f4e56b55f1889e24727b (patch)
tree39cf797e89b96e0c119c55ca0d2196416f853975 /src/libs/installer/componentmodel.cpp
parentf64011e117e759754f7b4f2885f9bf335a6596ff (diff)
Add possibility to search for components in ComponentSelectionPage
Introduce ComponentSortFilterProxyModel, that compared to its base class QSortFilterProxyModel, accepts also child indexes of a source model index which is directly accepted by the filter. Also remove emitting of QAbstractItemModel::dataChanged() for each item in the ComponentModel, which was done regardless of if data at index was changed or not, after reset or when check state or data for any item was changed. If the ComponentModel acts as a source model for a proxy model with 'dynamicSortFilter' property set to true, the extra emits hurt the performance as the model gets filtered again for each source model change. Actual changes done to the ComponentModel are still notified. Task-number: QTIFW-1404 Change-Id: Iea696f8b9abf79d877fb2568488b09dc3cb061be Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index aeaa0b2fc..56ee57fc6 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -511,15 +511,6 @@ void ComponentModel::updateAndEmitModelState()
}
emit checkStateChanged(m_modelState);
-
- foreach (const Component *component, m_rootComponentList) {
- emit dataChanged(indexFromComponentName(component->treeName()),
- indexFromComponentName(component->treeName()));
- QList<Component *> children = component->childItems();
- foreach (const Component *child, children)
- emit dataChanged(indexFromComponentName(child->treeName()),
- indexFromComponentName(child->treeName()));
- }
}
void ComponentModel::collectComponents(Component *const component, const QModelIndex &parent) const