summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@digia.com>2014-03-28 09:15:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-31 19:50:37 +0200
commitf4f23bd5b047353a1a6f56810917e0c0f27de219 (patch)
tree8aa0fc32a7089fd49ef1c53fd19017d87198ae84
parent423823dd2d87a0947834334922b2da3372f3691e (diff)
Add support for device capabilities on WinRT
WinRT distinguishes between regular capabilities and device capabilities. For now the latter section are location, microphone, proximity and webcam. Hence we must add those properly to the generated manifest. However, Windows Phone currently combines all of these into the Capability section, so add a warning if someone uses devicecapabilities for Windows Phone. Task-number: QTBUG-37932 Change-Id: I8e9550f29b6afdea3737cc85bdc68344fc04223d Reviewed-by: Andrew Knight <andrew.knight@digia.com>
-rw-r--r--mkspecs/features/winrt/package_manifest.prf7
1 files changed, 6 insertions, 1 deletions
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index a959bc5480..fda4fb5e8f 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -28,6 +28,7 @@
# WINRT_MANIFEST.iconic_tile_icon: Image file for the "iconic" tile template icon. Default provided by the mkspec.
# WINRT_MANIFEST.iconic_tile_small: Image file for the small "iconic" tile template logo. Default provided by the mkspec.
# WINRT_MANIFEST.capabilities: Specifies capabilities to add to the capability list.
+# WINRT_MANIFEST.capabilities_device: Specifies device capabilities to add to the capability list. (location, webcam...)
# WINRT_MANIFEST.dependencies: Specifies dependencies required by the package.
# The manifest is generated for each build pass for normal apps, and only once for vcapps.
@@ -95,10 +96,14 @@
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
- !isEmpty(WINRT_MANIFEST.capabilities)|winphone {
+ WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
+
+ !isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device)|winphone {
MANIFEST_CAPABILITIES += "<Capabilities>"
for(CAPABILITY, WINRT_MANIFEST.capabilities): \
MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
+ !winphone:for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
+ MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
MANIFEST_CAPABILITIES += "</Capabilities>"
WINRT_MANIFEST.capabilities = $$join(MANIFEST_CAPABILITIES, $$INDENT, $$INDENT)