From a28cf55b5a5007c0dd952b3012c076d9da329f0f Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Fri, 25 Mar 2022 15:38:50 +0200 Subject: Speed up component selection in component selection pages If a lot of components are installed, maintenancetool was slow to select/unselect a single component. This was caused because the whole tree's components were recalculated. Fixed so that only the selected/unselected components and their dependencies and autodependencies are recalculated instead of whole tree. This change speeds up clicking tree item from zero to 90 percent, depending on how much components are already installed. The more components are installed as autodependency, the slower it gets to select the items. Task-number: QTIFW-2522 Change-Id: I5e824aed8787fd7ecdce72b15a1b13848f0a3923 Reviewed-by: Arttu Tarkiainen --- src/libs/installer/packagemanagercore.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libs/installer/packagemanagercore.h') diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h index 7cce3f7be..bebfc191d 100644 --- a/src/libs/installer/packagemanagercore.h +++ b/src/libs/installer/packagemanagercore.h @@ -352,6 +352,7 @@ public Q_SLOTS: void setCompleteUninstallation(bool complete); void cancelMetaInfoJob(); void componentsToInstallNeedsRecalculation(); + void calculateUserSelectedComponentsToInstall(const QList &indexes); void clearComponentsToInstallCalculated(); Q_SIGNALS: @@ -437,6 +438,7 @@ private: PackageManagerCorePrivate *const d; friend class PackageManagerCorePrivate; QHash m_fileDialogAutomaticAnswers; + QHash m_localVirtualWithDependants; private: // remove once we deprecate isSelected, setSelected etc... -- cgit v1.2.3