diff options
author | Katja Marttila <katja.marttila@qt.io> | 2018-04-12 13:04:26 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2018-04-18 12:19:30 +0000 |
commit | 9dbdd261cd8813bc26b6d90a4baf23c7c6b4a778 (patch) | |
tree | 4627d9b560747c97bedeb6abcabe61e892508200 /src/libs/installer/componentmodel.cpp | |
parent | 7f8948f9e2da209732417c68d0237f9deb39ae2a (diff) |
Fix nested autodependency uninstall
Task-number: QTIFW-1114 QTBUG-67106
Change-Id: I29cdddaa81657e5fd2b9cbf343e16cc107ce6c18
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r-- | src/libs/installer/componentmodel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp index e0cc3fcd8..57fc05181 100644 --- a/src/libs/installer/componentmodel.cpp +++ b/src/libs/installer/componentmodel.cpp @@ -580,9 +580,13 @@ QSet<QModelIndex> ComponentModel::updateCheckedState(const ComponentSet &compone if (node->value(scCheckable, scTrue).toLower() == scFalse) { checkable = false; } - - if ((!node->isCheckable() && checkable) || !node->isEnabled() || !node->autoDependencies().isEmpty()) + // Let the check state to be checked up if the node is installed even if the component is not + // selectable/enabled or is installed as autodependency. Otherwise the node might not be selected + // and installer thinks it should be uninstalled. + if (!node->isInstalled() && + ((!node->isCheckable() && checkable) || !node->isEnabled() || !node->autoDependencies().isEmpty())) { continue; + } Qt::CheckState newState = state; const Qt::CheckState recentState = node->checkState(); |