From 40d2bdeb5846437872318c0383a1516b659f1d6a Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 5 Feb 2014 10:53:30 +0100 Subject: Fix preselection of components from another component Changing the (default) selection of another component per script was broken. If the select code comes right after the component loaded it could be that a late loaded component overwrites the set value. Now we do the preselection after we loaded every script (also this was the behavior in older versions, maybe got broken while refactoring in the past). Change-Id: Id6ec22da68d92c8ec764ff2cc2f6062880e29c51 Reviewed-by: Karsten Heimrich --- src/libs/installer/packagemanagercore_p.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index 782d3c574..c54a0e242 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -372,9 +372,13 @@ bool PackageManagerCorePrivate::buildComponentTree(QHash &c foreach (QInstaller::Component *component, components) { if (statusCanceledOrFailed()) return false; - if (loadScript) component->loadComponentScript(); + } + // now we can preselect components in the tree + foreach (QInstaller::Component *component, components) { + if (statusCanceledOrFailed()) + return false; // set the checked state for all components without child (means without tristate) if (component->isCheckable() && !component->isTristate()) { -- cgit v1.2.3