diff options
author | Katja Marttila <katja.marttila@qt.io> | 2018-05-15 13:02:28 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2018-05-15 13:04:50 +0300 |
commit | e408037e224c8e362c0bbfc39978705f9b14f03f (patch) | |
tree | d4c61dbdcc657df01267fb4102bfb84e2ab742cd /src/libs/installer/componentmodel.cpp | |
parent | a949acff470ec9e7ea02d6ed75e06291a1c09d20 (diff) | |
parent | 1642cd883d7a9a6961122531aa13f33a5f960d6c (diff) |
Merge remote-tracking branch 'origin/3.0' into master
Change-Id: I09cacedb966eebc3f42a3402b0b3dc4f6dcd9be8
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 8becdb191..8201248f8 100644 --- a/src/libs/installer/componentmodel.cpp +++ b/src/libs/installer/componentmodel.cpp @@ -584,9 +584,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(); |