diff options
author | Tim Jenssen <tim.jenssen@digia.com> | 2014-02-05 10:53:30 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@digia.com> | 2014-02-05 11:32:18 +0100 |
commit | 40d2bdeb5846437872318c0383a1516b659f1d6a (patch) | |
tree | 7fbd59a3bb807028846bf6f69c3775d623d4e7e7 | |
parent | e696f3c28aef90e98d0908b27e983c2d22c644e3 (diff) |
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 <karsten.heimrich@digia.com>
-rw-r--r-- | src/libs/installer/packagemanagercore_p.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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<QString, Component*> &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()) { |