From f4f23bd5b047353a1a6f56810917e0c0f27de219 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 28 Mar 2014 09:15:11 +0100 Subject: [PATCH] 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 --- mkspecs/features/winrt/package_manifest.prf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 += "" for(CAPABILITY, WINRT_MANIFEST.capabilities): \ MANIFEST_CAPABILITIES += " " + !winphone:for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \ + MANIFEST_CAPABILITIES += " " MANIFEST_CAPABILITIES += "" WINRT_MANIFEST.capabilities = $$join(MANIFEST_CAPABILITIES, $$INDENT, $$INDENT)