summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-03-10 17:01:26 +0100
committerJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-03-11 09:53:38 +0000
commit8c2941ae5892826520cccc946d13c17c8cc347f0 (patch)
treed93f36c190c653a77981e0da2ba4f98c211a67da /src/libs
parentdd2c70b10ddf0424ee96a30efcf0df93e88ef491 (diff)
Issue a warning when a component depends on auto dependent one.
Task-number: QTIFW-510 Change-Id: I57eff879deebf8f31a472a6c66a7e275e34447bd Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/componentchecker.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libs/installer/componentchecker.cpp b/src/libs/installer/componentchecker.cpp
index 381fcf9c1..6b2487668 100644
--- a/src/libs/installer/componentchecker.cpp
+++ b/src/libs/installer/componentchecker.cpp
@@ -42,6 +42,7 @@ namespace QInstaller {
QStringList ComponentChecker::checkComponent(Component *component)
{
+ PackageManagerCore *core = component->packageManagerCore();
QStringList checkResult;
const bool defaultPropertyScriptValue = component->variables().value(scDefault).compare(scScript, Qt::CaseInsensitive) == 0;
@@ -62,6 +63,11 @@ QStringList ComponentChecker::checkComponent(Component *component)
"with \"AutoDependOn\" list. This combination of states may not work properly.")
.arg(component->name());
}
+ if (!core->dependees(component).isEmpty()) {
+ checkResult << QString::fromLatin1("Other components depend on auto dependent "
+ "component %1. This may not work properly.")
+ .arg(component->name());
+ }
}
if (component->packageManagerCore()->isInstaller()) {
if (component->isTristate()) {
@@ -105,7 +111,6 @@ QStringList ComponentChecker::checkComponent(Component *component)
.arg(component->name());
}
- PackageManagerCore *core = component->packageManagerCore();
if (!core->dependees(component).isEmpty()) {
checkResult << QString::fromLatin1("Other components depend on component %1 "
"which has children components. This will not work properly.")
@@ -113,6 +118,7 @@ QStringList ComponentChecker::checkComponent(Component *component)
}
}
}
+
return checkResult;
}