From 51e02b08abb44131929dba2d86860d10ca17cf41 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Mon, 28 Nov 2022 13:30:21 +0200 Subject: Cleanup installer calculator classes As there are several optimizations done, the single click of component in component selection tree is not slow anymore. Cleaning the code so it is easier to maintain. Basically this revers commit a28cf55b5a5007c0dd952b3012c076d9da329f0f but as there are bug fixes made after that so pure revert could not be done. Task-number: QTIFW-2885 Change-Id: Id486d5dc68c42c31b4848cd19a1761bcfe242db6 Reviewed-by: Arttu Tarkiainen --- src/libs/installer/packagemanagercore_p.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/libs/installer/packagemanagercore_p.cpp') diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index 6eb589086..129c35d46 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -542,21 +542,6 @@ QHash &PackageManagerCorePrivate::componentReplaces() return m_componentReplaces; } -QList PackageManagerCorePrivate::replacedComponentsByName(const QString &name) -{ - // Creates a list of components which are replaced by component 'name' - QList replacedComponents; - if (m_componentReplaces.contains(name)) { - for (const QString &replacedComponentName : m_componentReplaces.value(name)) { - Component *replacedComponent = m_core->componentByName(replacedComponentName, - m_core->components(PackageManagerCore::ComponentType::All)); - if (replacedComponent) - replacedComponents.append(replacedComponent); - } - } - return replacedComponents; -} - void PackageManagerCorePrivate::clearInstallerCalculator() { delete m_installerCalculator; @@ -591,7 +576,7 @@ UninstallerCalculator *PackageManagerCorePrivate::uninstallerCalculator() const } } - pmcp->m_uninstallerCalculator = new UninstallerCalculator(installedComponents, m_core, + pmcp->m_uninstallerCalculator = new UninstallerCalculator(m_core, pmcp->m_autoDependencyComponentHash, pmcp->m_localDependencyComponentHash, pmcp->m_localVirtualComponents); } return m_uninstallerCalculator; -- cgit v1.2.3