summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@digia.com>2013-05-16 03:58:26 +0200
committerChristian Stromme <christian.stromme@digia.com>2013-05-22 18:24:40 +0200
commit35b96f2fc11bcc6d0b4bfb2b405c115fb0d6033e (patch)
treed9edde33de7e57c3cfdf203906fac9948e5c70ed
parent1c6a3b9dbfab31eb36838da9bba609fe469d27e6 (diff)
downloadqt-creator-35b96f2fc11bcc6d0b4bfb2b405c115fb0d6033e.tar.gz
Android: Detect conditional dependencies.
To solve the problem with libQt5MultimediaQuick_p we need a way to detect if an application is using both QtMultimedia and QtQuick. This change adds logic to parse the -dependencies.xml file and look for lib elements that have the extra attribute "extends". Libs with the extends attribute will only be added to the list of dependencies, if the library it extends is available. Task-number: QTCREATORBUG-9300 Change-Id: I6f3e0a6d9158a91824e1e113f6aab7ec1112dd56 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r--src/plugins/android/androidmanager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index 29ff4ed09b..03aa1b56b6 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -895,8 +895,14 @@ QString AndroidManager::loadLocal(ProjectExplorer::Target *target, int apiLevel,
if (libElement.attribute(QLatin1String("bundling")).toInt() == (item == BundledJar ? 1 : 0)) {
if (libElement.hasAttribute(attribute)) {
QString dependencyLib = libElement.attribute(attribute).arg(apiLevel);
- if (!dependencyLibs.contains(dependencyLib))
+ if (libElement.hasAttribute(QLatin1String("extends"))) {
+ const QString extends = libElement.attribute(QLatin1String("extends"));
+ if (libs.contains(extends)) {
+ dependencyLibs << dependencyLib;
+ }
+ } else if (!dependencyLibs.contains(dependencyLib)) {
dependencyLibs << dependencyLib;
+ }
}
if (libElement.hasAttribute(QLatin1String("replaces"))) {