From 82e2ad0d82b3afccbda2677385364cfdb65f5ab2 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Thu, 26 Apr 2018 19:28:05 +0300 Subject: 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 --- src/libs/installer/uninstallercalculator.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libs/installer/uninstallercalculator.cpp') 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 *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); } } } -- cgit v1.2.3