summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/installercalculator.h
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2022-06-17 20:14:41 +0300
committerKatja Marttila <katja.marttila@qt.io>2022-06-20 10:59:27 +0300
commit986faf1ff65fd213bbce34e2b7bb148aeaff2611 (patch)
tree598356a56e75821f5490f0e32889a652d7dea029 /src/libs/installer/installercalculator.h
parentb7857979037a55fc562d8e888afa1404279bac00 (diff)
Fix bug when installer is not installing required components
Components can be requested to install by several components using dependency. Components should have a reference count to inform how many components are requesting the install, so that the component can be removed from install when nobody has requested it, or user has not explicitly selected it for install. Dependency reference count was not calculated correctly, user selection was ignored if component was already added as dependency. Also if component which is added as dependency is also autodependency to same component should not increase the reference count, as the component is uninstalled when the reference count is zero. Having both autodependency and dependency would never cause the reference count to be zero. Task-number: QTIFW-2708 Change-Id: I398bc892f6626d76c872402d8ab55cb8115112ae Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/installercalculator.h')
-rw-r--r--src/libs/installer/installercalculator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libs/installer/installercalculator.h b/src/libs/installer/installercalculator.h
index 21b3775eb..d952a1e8c 100644
--- a/src/libs/installer/installercalculator.h
+++ b/src/libs/installer/installercalculator.h
@@ -71,6 +71,7 @@ private:
bool appendComponentToInstall(Component *component, const QString &version, const bool revertFromInstall);
QString recursionError(const Component *component) const;
QSet<Component *> autodependencyComponents(const bool revertFromInstall);
+ void calculateComponentDependencyReferences(const QString dependencyComponentName, const Component *component);
private:
PackageManagerCore *m_core;