winrt: Avoid empty <Dependencies> section in manifest files

If that section is there but empty, the manifest cannot be loaded using
the App Manifest Designer in Visual Studio.

Task-number: QTBUG-48648
Change-Id: I529eb2f2a690bececcf5c385b8f96e84ece363d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This commit is contained in:
Oliver Wolff 2015-10-08 11:23:35 +02:00 committed by Maurice Kalinowski
parent e19bedc846
commit 2538b53340
3 changed files with 6 additions and 4 deletions

View File

@ -42,7 +42,6 @@
</m2:VisualElements>
</Application>
</Applications>$${WINRT_MANIFEST.capabilities}
<Dependencies>$${WINRT_MANIFEST.dependencies}
</Dependencies>
$${WINRT_MANIFEST.dependencies}
</Package>
<!-- Generated by qmake using the $$[QMAKE_XSPEC] mkspec. -->

View File

@ -43,7 +43,6 @@
</m3:VisualElements>
</Application>
</Applications>$${WINRT_MANIFEST.capabilities}
<Dependencies>$${WINRT_MANIFEST.dependencies}
</Dependencies>
$${WINRT_MANIFEST.dependencies}
</Package>
<!-- Generated by qmake using the $$[QMAKE_XSPEC] mkspec. -->

View File

@ -125,10 +125,14 @@
# Dependencies are given as a string list. The CRT dependency is added automatically above.
# For MSVC2015 the dependencies are added in conjunction with TargetDeviceFamily
# Due to the hard coded dependency on "Windows.Universal" the <Dependencies> tag
# is already inside the MSVC2015 manifest.
WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies)
!isEmpty(WINRT_MANIFEST.dependencies) {
*-msvc2013: MANIFEST_DEPENDENCIES += "<Dependencies>"
for(DEPENDENCY, WINRT_MANIFEST.dependencies): \
MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />"
*-msvc2013: MANIFEST_DEPENDENCIES += "</Dependencies>"
WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT)
}