From 4e77f5ce0a69765ae7571a8981536f8494184f87 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Mon, 14 Feb 2022 16:34:18 +0100 Subject: [PATCH] Set version for tst_qguiapplication and tst_qcoreapplication In tst_qguiapplication and tst_qcoreapplication, the application version should be set. On Android, this is done using QT_ANDROID_VERSION_CODE. Pick-to: 6.2 6.3 Change-Id: I6b473ad25092fb24df9400e0ab8fbb8ea4edbb6a Reviewed-by: Alexey Edelev Reviewed-by: Assam Boudjelthia --- tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt | 5 +++++ tests/auto/gui/kernel/qguiapplication/CMakeLists.txt | 3 +++ 2 files changed, 8 insertions(+) diff --git a/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt b/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt index 24be474f90d..92d4b03d26a 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt @@ -31,6 +31,11 @@ if (APPLE) endif() # special case end +if (ANDROID) + set_property(TARGET tst_qcoreapplication PROPERTY QT_ANDROID_VERSION_NAME ${target_version}) +endif() + + #### Keys ignored in scope 1:.:.:qcoreapplication.pro:: # QMAKE_INFO_PLIST = "$$PWD/Info.plist" # _REQUIREMENTS = "qtConfig(private_tests)" diff --git a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt index 7c3c4efc452..12989dd3752 100644 --- a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt +++ b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt @@ -35,6 +35,9 @@ qt_internal_add_test(tst_qguiapplication BUILTIN_TESTDATA ) +if (ANDROID) + set_property(TARGET tst_qguiapplication PROPERTY QT_ANDROID_VERSION_NAME ${target_version}) +endif() # special case begin if (APPLE) set_property(TARGET tst_qguiapplication PROPERTY MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")