diff options
author | Katja Marttila <katja.marttila@qt.io> | 2018-04-26 19:28:05 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2018-05-03 06:41:57 +0000 |
commit | 82e2ad0d82b3afccbda2677385364cfdb65f5ab2 (patch) | |
tree | b593b9724c25b0c8fd37b65d81fc5c32c24743bf /src/libs/installer/uninstallercalculator.cpp | |
parent | 7b196800edd6e89a15f2c237d3b4e430802d6818 (diff) |
Fix nested autodependency uninstall
Previous commit worked only when --show-virtual-components was uses.
Task-number: QTIFW-1114 QTBUG-67106
Change-Id: I6d0649a37095b10ec9fd3a079e020f6a70345c94
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
Diffstat (limited to 'src/libs/installer/uninstallercalculator.cpp')
-rw-r--r-- | src/libs/installer/uninstallercalculator.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs/installer/uninstallercalculator.cpp b/src/libs/installer/uninstallercalculator.cpp index 5d49d37dc..597c7902f 100644 --- a/src/libs/installer/uninstallercalculator.cpp +++ b/src/libs/installer/uninstallercalculator.cpp @@ -103,16 +103,17 @@ void UninstallerCalculator::appendComponentsToUninstall(const QList<Component*> Component *cc = PackageManagerCore::componentByName(possibleName, m_installedComponents); if (!cc->uninstallationRequested()) { - autoDependencies.removeAll(possibleName); + if (cc->installAction() != ComponentModelHelper::AutodependUninstallation) { + autoDependencies.removeAll(possibleName); + } } } } - // A component requested auto installation, keep it to resolve their dependencies as well. - // Mark it unchecked for their dependencies to know that the component is marked for uninstallation. + // A component requested auto uninstallation, keep it to resolve their dependencies as well. if (!autoDependencies.isEmpty()) { autoDependOnList.append(component); - component->setCheckState(Qt::Unchecked); + component->setInstallAction(ComponentModelHelper::AutodependUninstallation); } } } |