diff options
author | Martin Negyokru <negyokru@inf.u-szeged.hu> | 2023-04-27 17:14:19 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-06-19 07:36:29 +0000 |
commit | 4ae60b79dc91e675cf7b4b81567a58ddbe1ad505 (patch) | |
tree | 76c20444ffe7a010d74c1db0edf0ea5fa32f1fd3 /examples | |
parent | 8cbe13a4fb157f442f88dbf9785b328059943557 (diff) |
Add Windows 10 compatible manifest to examples
This manifest is required for User-Agent to report the
correct Windows versions.
Document Windows App Manifest in platform-notes and
mention it in the httpUserAgent documentation.
Fixes: QTBUG-63021
Change-Id: Ie3896c50a0a912742e8d1a0dc20f3305b343d3f4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a565ffcc172da74ae6ca0f847a0b162ffd68e918)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
6 files changed, 58 insertions, 0 deletions
diff --git a/examples/webenginequick/quicknanobrowser/CMakeLists.txt b/examples/webenginequick/quicknanobrowser/CMakeLists.txt index ac41569aa..c1f0080bb 100644 --- a/examples/webenginequick/quicknanobrowser/CMakeLists.txt +++ b/examples/webenginequick/quicknanobrowser/CMakeLists.txt @@ -19,6 +19,13 @@ qt_add_executable(quicknanobrowser utils.h ) +if(WIN32) + set_property( + TARGET quicknanobrowser + APPEND PROPERTY + SOURCES quicknanobrowser.exe.manifest) +endif() + set_target_properties(quicknanobrowser PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE diff --git a/examples/webenginequick/quicknanobrowser/quicknanobrowser.exe.manifest b/examples/webenginequick/quicknanobrowser/quicknanobrowser.exe.manifest new file mode 100644 index 000000000..acc401776 --- /dev/null +++ b/examples/webenginequick/quicknanobrowser/quicknanobrowser.exe.manifest @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!--The ID below indicates application support for Windows Vista --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!--The ID below indicates application support for Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + <!--The ID below indicates application support for Windows 8 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + <!--The ID below indicates application support for Windows 8.1 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + <!--The ID below indicates application support for Windows 10/11 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + </application> +</compatibility> +</assembly> diff --git a/examples/webenginequick/quicknanobrowser/quicknanobrowser.pro b/examples/webenginequick/quicknanobrowser/quicknanobrowser.pro index e4c0cdfd1..bd5427dc5 100644 --- a/examples/webenginequick/quicknanobrowser/quicknanobrowser.pro +++ b/examples/webenginequick/quicknanobrowser/quicknanobrowser.pro @@ -6,6 +6,11 @@ TARGET = quicknanobrowser HEADERS = utils.h SOURCES = main.cpp +win32 { + CONFIG -= embed_manifest_exe + QMAKE_MANIFEST = $$PWD/quicknanobrowser.exe.manifest +} + RESOURCES += resources.qrc QT += qml quick webenginequick diff --git a/examples/webenginewidgets/simplebrowser/CMakeLists.txt b/examples/webenginewidgets/simplebrowser/CMakeLists.txt index 2dd4fd57a..cb0769e77 100644 --- a/examples/webenginewidgets/simplebrowser/CMakeLists.txt +++ b/examples/webenginewidgets/simplebrowser/CMakeLists.txt @@ -29,6 +29,13 @@ qt_add_executable(simplebrowser webview.cpp webview.h ) +if(WIN32) + set_property( + TARGET simplebrowser + APPEND PROPERTY + SOURCES simplebrowser.exe.manifest) +endif() + set_target_properties(simplebrowser PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE diff --git a/examples/webenginewidgets/simplebrowser/simplebrowser.exe.manifest b/examples/webenginewidgets/simplebrowser/simplebrowser.exe.manifest new file mode 100644 index 000000000..acc401776 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/simplebrowser.exe.manifest @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!--The ID below indicates application support for Windows Vista --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!--The ID below indicates application support for Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + <!--The ID below indicates application support for Windows 8 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + <!--The ID below indicates application support for Windows 8.1 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + <!--The ID below indicates application support for Windows 10/11 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + </application> +</compatibility> +</assembly> diff --git a/examples/webenginewidgets/simplebrowser/simplebrowser.pro b/examples/webenginewidgets/simplebrowser/simplebrowser.pro index 7584cfb01..d4cce7738 100644 --- a/examples/webenginewidgets/simplebrowser/simplebrowser.pro +++ b/examples/webenginewidgets/simplebrowser/simplebrowser.pro @@ -23,6 +23,11 @@ SOURCES += \ webpopupwindow.cpp \ webview.cpp +win32 { + CONFIG -= embed_manifest_exe + QMAKE_MANIFEST = $$PWD/simplebrowser.exe.manifest +} + FORMS += \ certificateerrordialog.ui \ passworddialog.ui \ |