summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2013-08-13 15:35:03 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2013-08-14 15:14:50 +0200
commit6ef1700d42114acc472a312184894f383d26afde (patch)
treecf2df8a59d96db0d4d7750f4198d6edfc6a8bdb1 /src/libs/installer/componentmodel.cpp
parent266c8c08935918632907d222fcfced0fb1e1b7cc (diff)
Fix broken "Next" button behavior after uncheck/check of a component.
Change-Id: I7cc36df32594a57442bc316e7c271fc00c0ad4a2 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index 5285154f6..080e84d85 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -325,10 +325,16 @@ void ComponentModel::setRootComponents(QList<QInstaller::Component*> rootCompone
m_uncheckable.clear();
m_indexByNameCache.clear();
m_rootComponentList.clear();
- m_initialCheckedState.clear();
- m_currentCheckedState.clear();
m_modelState = DefaultChecked;
+ // Initialize these with an empty set for every possible state, cause we compare the hashes later in
+ // updateAndEmitModelState(). The comparison than might lead to wrong results if one of the checked
+ // states is absent initially.
+ m_initialCheckedState[Qt::Checked] = ComponentSet();
+ m_initialCheckedState[Qt::Unchecked] = ComponentSet();
+ m_initialCheckedState[Qt::PartiallyChecked] = ComponentSet();
+ m_currentCheckedState = m_initialCheckedState; // both should be equal
+
// show virtual components only in case we run as updater or if the core engine is set to show them
const bool showVirtuals = m_core->isUpdater() || m_core->virtualComponentsVisible();
foreach (Component *const component, rootComponents) {