summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/component.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-09-22 15:44:29 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-09-22 16:01:37 +0200
commit134c88b819d1c4866190a14336c6b56ef0f3acbe (patch)
tree15323b91278ed2c33a9bef49448ec017a6cbdc9c /src/libs/installer/component.cpp
parentf27c3da12c3c32d35656894a7e53108855ba55b3 (diff)
Add small auto test.
Also fix the implementation for append component in updater case as well as adjust the documentation. The returned list contains all components independent of the run mode. Change-Id: I36523e13c33b9ca6de6e02fcc31e0f0d6606f65b Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r--src/libs/installer/component.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index be0d01697..bdb3dfd60 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -406,6 +406,9 @@ Component *Component::parentComponent() const
*/
void Component::appendComponent(Component *component)
{
+ if (d->m_core->isUpdater())
+ throw Error(tr("Components cannot have children in updater mode."));
+
if (!component->isVirtual()) {
d->m_childComponents.append(component);
std::sort(d->m_childComponents.begin(), d->m_childComponents.end(), SortingPriorityGreaterThan());