diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-08-10 15:55:07 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-08-16 09:48:40 +0000 |
commit | 284fb7d87bc1f017c3f04e703749b367b24e505f (patch) | |
tree | f8989e5a2ae3ca847e9a23fe8203eeb7299fa546 | |
parent | 72c6dc7bd1cb53c99ac1ca79e1a242ae6ba7d619 (diff) |
MT: Install new <ForcedInstallation> components with default check state
ComponentSelectionPage::isComplete() would return false if the state of
the component model was "DefaultChecked" and user had not (de)selected
any new components. This change adds a condition to check if there are
any ForcedInstallation components that haven't been previously
installed, and allows navigating forward and installing those without
additional selections.
Task-number: QTIFW-2286
Change-Id: I273cc7219df1eae4e11ff23e733d71a9c297bedd
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r-- | src/libs/installer/packagemanagergui.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index 86c3a2d0c..52b0bb222 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -2241,7 +2241,16 @@ bool ComponentSelectionPage::isComplete() const { if (packageManagerCore()->isInstaller() || packageManagerCore()->isUpdater()) return d->m_currentModel->checked().count(); - return d->m_currentModel->checkedState().testFlag(ComponentModel::DefaultChecked) == false; + + if (d->m_currentModel->checkedState().testFlag(ComponentModel::DefaultChecked) == false) + return true; + + const QSet<Component *> uncheckable = d->m_currentModel->uncheckable(); + for (auto &component : uncheckable) { + if (component->forcedInstallation() && !component->isInstalled()) + return true; // allow installation for new forced components + } + return false; } |