diff options
author | kh1 <karsten.heimrich@nokia.com> | 2011-08-22 17:54:26 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2011-08-23 10:57:45 +0200 |
commit | a222f8f9c7fccadd4c017b5c5be5639bb288adbb (patch) | |
tree | 3dc8bc50af1c2cf2f219a2375ee09bf8c2264b75 /installerbuilder/installerbase/installerbasecommons.cpp | |
parent | 68a367649a25b38cf69ec9dcacddc0e921c5b4f2 (diff) |
Make sure we only calculate the components on actual change.
Change-Id: I5967f2fa2cba3e54519a4b8b5155b570d34d7a22
Reviewed-on: http://codereview.qt.nokia.com/3333
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder/installerbase/installerbasecommons.cpp')
-rw-r--r-- | installerbuilder/installerbase/installerbasecommons.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/installerbuilder/installerbase/installerbasecommons.cpp b/installerbuilder/installerbase/installerbasecommons.cpp index 0f223c6d5..b483f4adb 100644 --- a/installerbuilder/installerbase/installerbasecommons.cpp +++ b/installerbuilder/installerbase/installerbasecommons.cpp @@ -343,16 +343,12 @@ int InstallerGui::nextId() const if (!core->isInstaller()) return nextNextId; - QList<Component*> components = core->orderedComponentsToInstall(); - bool foundLicense = false; - - foreach (Component* component, components) { - if (!component->licenses().isEmpty()) { - foundLicense = true; - break; - } + core->calculateComponentsToInstall(); + foreach (Component* component, core->orderedComponentsToInstall()) { + if (!component->licenses().isEmpty()) + return next; } - return foundLicense ? next : nextNextId; + return nextNextId; } return next; } @@ -396,20 +392,14 @@ int MaintenanceGui::nextId() const if (!core->isPackageManager() && !core->isUpdater()) return nextNextId; - QList<Component*> components = core->orderedComponentsToInstall(); - if (components.isEmpty()) - return nextNextId; - - bool foundLicense = false; - foreach (Component* component, components) { + core->calculateComponentsToInstall(); + foreach (Component* component, core->orderedComponentsToInstall()) { if (component->isInstalled()) continue; - if (!component->licenses().isEmpty()) { - foundLicense = true; - break; - } + if (!component->licenses().isEmpty()) + return next; } - return foundLicense ? next : nextNextId; + return nextNextId; } return next; } |