summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kde.org>2013-10-15 13:34:20 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-23 16:02:28 +0200
commitac41a8cb8894108868ef91e10888a08e482767b5 (patch)
tree751896fbbf96a65699e0b7bfbc9ed28250799cab
parent61981129d4355cfc6d7c9cc440e57d3a7ea05ee5 (diff)
downloadqttools-ac41a8cb8894108868ef91e10888a08e482767b5.tar.gz
Fix deploy mechanism.
The order of "android:value" and "android:name" attributes can be changed when saving the XML document. Use placeholders instead. Change-Id: I32e7bf0c91565f5e219d16f549cf1c6583398df0 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
-rw-r--r--src/androiddeployqt/main.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp
index e8429d2d6..974448d38 100644
--- a/src/androiddeployqt/main.cpp
+++ b/src/androiddeployqt/main.cpp
@@ -867,16 +867,10 @@ bool updateAndroidManifest(const Options &options)
replacements[QLatin1String("-- %%INSERT_INIT_CLASSES%% --")] = options.initClasses.join(QLatin1Char(':'));
replacements[QLatin1String("<!-- %%INSERT_USES_SDK%% -->")] = usesSdk;
replacements[QLatin1String("package=\"org.qtproject.example\"")] = QString::fromLatin1("package=\"%1\"").arg(options.packageName);
-
- if (options.deploymentMechanism == Options::Ministro) {
- replacements[QLatin1String("<meta-data android:value=\"1\" android:name=\"android.app.use_local_qt_libs\"/>")]
- = QString::fromLatin1("<meta-data android:value=\"0\" android:name=\"android.app.use_local_qt_libs\"/>");
- }
-
- if (options.deploymentMechanism != Options::Bundled) {
- replacements[QLatin1String("<meta-data android:value=\"1\" android:name=\"android.app.bundle_local_qt_libs\"/>")]
- = QString::fromLatin1("<meta-data android:value=\"0\" android:name=\"android.app.bundle_local_qt_libs\"/>");
- }
+ replacements[QLatin1String("-- %%BUNDLE_LOCAL_QT_LIBS%% --")]
+ = (options.deploymentMechanism == Options::Bundled) ? QString::fromLatin1("1") : QString::fromLatin1("0");
+ replacements[QLatin1String("-- %%USE_LOCAL_QT_LIBS%% --")]
+ = (options.deploymentMechanism != Options::Ministro) ? QString::fromLatin1("1") : QString::fromLatin1("0");
if (!androidOrientation.isEmpty())
replacements[QLatin1String("android:screenOrientation=\"unspecified\"")] = QString::fromLatin1("android:screenOrientation=\"%1\"").arg(androidOrientation);