diff options
author | jkobus <jaroslaw.kobus@theqtcompany.com> | 2014-12-03 10:14:55 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@theqtcompany.com> | 2014-12-04 08:45:49 +0100 |
commit | 1da26b57c0d3b9008211c0a966b2df38f29b14b6 (patch) | |
tree | aa586614ebd746c3f61432ddbe961f04710d82ea /src/libs/installer | |
parent | a96b063605ece83d30c32529f2592f650c4165a0 (diff) |
Remove unneeded Kind enum
The DirectChildernOnly value was not used at all.
Change-Id: I9e6d4160f0964e807a34049b899bb4288b262b40
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer')
-rw-r--r-- | src/libs/installer/component.cpp | 9 | ||||
-rw-r--r-- | src/libs/installer/component.h | 8 | ||||
-rw-r--r-- | src/libs/installer/packagemanagercore.cpp | 2 |
3 files changed, 5 insertions, 14 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 633f7a744..7e57e239d 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -456,22 +456,19 @@ void Component::removeComponent(Component *component) } /*! - Returns a list of child components. If \a kind is set to DirectChildrenOnly, the returned list contains - only the direct children, if set to Descendants it will also include all descendants of the components + Returns a list of child components, including all descendants of the components children. Note: The returned list does include ALL children, non virtual components as well as virtual components. */ -QList<Component *> Component::childComponents(Kind kind) const +QList<Component *> Component::descendantComponents() const { if (d->m_core->isUpdater()) return QList<Component*>(); QList<Component *> result = d->m_allChildComponents; - if (kind == DirectChildrenOnly) - return result; foreach (Component *component, d->m_allChildComponents) - result += component->childComponents(kind); + result += component->descendantComponents(); return result; } diff --git a/src/libs/installer/component.h b/src/libs/installer/component.h index f7f43678f..0267905d1 100644 --- a/src/libs/installer/component.h +++ b/src/libs/installer/component.h @@ -75,12 +75,6 @@ class INSTALLER_EXPORT Component : public QObject, public ComponentModelHelper Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled) public: - enum Kind - { - Descendants = 0x1000, // all descendants of the current component (children, grandchildren, etc.) - DirectChildrenOnly = 0x2000 // all child components of the current component - }; - explicit Component(PackageManagerCore *core); ~Component(); @@ -113,7 +107,7 @@ public: Component *parentComponent() const; void appendComponent(Component *component); void removeComponent(Component *component); - QList<Component*> childComponents(Component::Kind kind) const; + QList<Component*> descendantComponents() const; void loadComponentScript(); diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 392745e1a..960c2da93 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -1180,7 +1180,7 @@ QList<Component *> PackageManagerCore::components(ComponentTypes mask) const if (!updater) { if (mask.testFlag(ComponentType::Descendants)) { foreach (QInstaller::Component *component, d->m_rootComponents) - components += component->childComponents(Component::Descendants); + components += component->descendantComponents(); } } else { if (mask.testFlag(ComponentType::Dependencies)) |