diff options
author | kh1 <qt-info@nokia.com> | 2011-08-11 17:38:26 +0200 |
---|---|---|
committer | kh1 <qt-info@nokia.com> | 2011-08-12 11:03:11 +0200 |
commit | 9b79816af33ae21a0ba98259abec74f1452edc5b (patch) | |
tree | ac4b2a50a47ca01f6ff2f857752f07f55631a07d /installerbuilder | |
parent | b43b6d25a2de744d37d009cdf632165f50440cab (diff) |
Add comment and fix the broken function.
Review-By: Niels Weber
We need to return all components depending on the run mode,
otherwise we would never be able to resolve possible auto
depend on values, call language changed etc...
Diffstat (limited to 'installerbuilder')
-rw-r--r-- | installerbuilder/libinstaller/packagemanagercore.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp index 34a7c9564..be2965f72 100644 --- a/installerbuilder/libinstaller/packagemanagercore.cpp +++ b/installerbuilder/libinstaller/packagemanagercore.cpp @@ -842,14 +842,19 @@ Component* PackageManagerCore::componentByName(const QString &name) const return subComponentByName(this, name); } +/*! + Returns a list of all available components found during a fetch. Note that depending on the run mode the + returned list might have different values. In case of updater mode, components scheduled for an + update as well as all possible dependencies are returned. +*/ QList<Component*> PackageManagerCore::availableComponents() const { - QList<Component*> result; - foreach (QInstaller::Component *component, d->m_rootComponents) { - result.push_back(component); - result += component->childComponents(true, AllMode); - } + if (isUpdater()) + return d->m_updaterComponents + d->m_updaterComponentsDeps; + QList<Component*> result = d->m_rootComponents; + foreach (QInstaller::Component *component, d->m_rootComponents) + result += component->childComponents(true, AllMode); return result; } |