qt6-bb10/tests/auto/cmake
Fabian Kosmale 238868c518 _qt_internal_process_resource: Properly escape XML
XML requires escaping for certain characters, and we need to consider
this when writing out qrc files (which use XML).

This commit introduces a helper function,
_qt_internal_escape_xml_characters, to take care of the escaping.
It uses regular expressions to process the input strings. We take care
to start with '&', as '&' needs to be escaped, too.

We minimize the amount of escaping we're doing (the exact rules
differing between attributes and text), to avoid unnecessary work that
needs to be done when configuring a project. This is achieved by a
SUBSET option which can be passed to _qt_internal_escape_xml_characters.

Task-number: QTBUG-131916
Change-Id: Ic1bd0eedee0343c3d70b6954842e21b3c550b092
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e4fbbdea05540723d4c4429d673d25efa3201d7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6e35353c83925d7c0d5f90db320ef9621f1ffb94)
2025-01-25 14:21:36 +00:00
..
mockplugins Bump version to 6.8.3 2025-01-23 11:04:42 +00:00
test(needsquoting)dirname Change license for tests files 2024-02-04 09:56:42 +01:00
test_QFINDTESTDATA Change license for tests files 2024-02-04 09:56:42 +01:00
test_QTBUG-63422 Change license for tests files 2024-02-04 09:56:42 +01:00
test_QTP0003 Change license for tests files 2024-02-04 09:56:42 +01:00
test_QT_TESTCASE_BUILDDIR Change license for tests files 2024-02-04 09:56:42 +01:00
test_add_big_resource Change license for tests files 2024-02-04 09:56:42 +01:00
test_add_binary_resources_delayed_file Change license for tests files 2024-02-04 09:56:42 +01:00
test_add_resource_options Change license for tests files 2024-02-04 09:56:42 +01:00
test_add_resource_prefix _qt_internal_process_resource: Properly escape XML 2025-01-25 14:21:36 +00:00
test_add_resources_big_resources Change license for tests files 2024-02-04 09:56:42 +01:00
test_add_resources_binary_generated Change license for tests files 2024-02-04 09:56:42 +01:00
test_add_resources_delayed_file Change license for tests files 2024-02-04 09:56:42 +01:00
test_android_aar Android: Add autotest to verify the content of an AAR target 2024-05-27 07:57:47 +00:00
test_android_multi_abi_forward_vars Change license for tests files 2024-02-04 09:56:42 +01:00
test_build_simple_widget_app Change license for tests files 2024-02-04 09:56:42 +01:00
test_collecting_plugins Add plugins of imported QtModules to the _qt_plugins property 2024-02-06 20:23:18 +01:00
test_concurrent_module Tests: Reduce the number of module includes 2024-11-04 19:42:27 +00:00
test_config_expressions CMake: Fix config condition evaluator 2023-09-21 21:46:46 +02:00
test_dbus_module Change license for tests files 2024-02-04 09:56:42 +01:00
test_dependent_modules Change license for tests files 2024-02-04 09:56:42 +01:00
test_egl_lib Change license for tests files 2024-02-04 09:56:42 +01:00
test_generating_cpp_exports Bump version to 6.8.3 2025-01-23 11:04:42 +00:00
test_global_promotion
test_import_plugins Change license for tests files 2024-02-04 09:56:42 +01:00
test_interface Add copyright and licensing to .cpp and .h files missing them 2024-05-28 09:47:01 +02:00
test_interface_link_libraries Change license for tests files 2024-02-04 09:56:42 +01:00
test_json_plugin_includes Change license for tests files 2024-02-04 09:56:42 +01:00
test_moc_macro_target Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
test_multiple_find_package Change license for tests files 2024-02-04 09:56:42 +01:00
test_opengl_lib Change license for tests files 2024-02-04 09:56:42 +01:00
test_platform_defs_include Change license for tests files 2024-02-04 09:56:42 +01:00
test_plugin_shared_static_flavor
test_plugins
test_private_includes Change license for tests files 2024-02-04 09:56:42 +01:00
test_private_targets Change license for tests files 2024-02-04 09:56:42 +01:00
test_qt_add_resources_rebuild Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
test_qt_add_ui_1 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_2 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_3 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_4 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_5 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_6 CMake: qt_add_ui: Add sources to target_sources 2024-08-12 17:26:49 +00:00
test_qt_add_ui_7 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_8 CMake: qt_add_ui: Add sources to target_sources 2024-08-12 17:26:49 +00:00
test_qt_add_ui_9 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_10 CMake: Add `qt_add_ui` API 2024-05-07 21:12:29 +02:00
test_qt_add_ui_11 CMake: qt_add_ui: Add sources to target_sources 2024-08-12 17:26:49 +00:00
test_qt_add_ui_common CMake: qt_add_ui: Add sources to target_sources 2024-08-12 17:26:49 +00:00
test_qt_extract_metatypes moc: add line number for class definition to JSON output 2024-08-03 07:04:04 +00:00
test_qt_manual_moc Add the support for custom definitions to the qt_manual_moc function 2024-02-23 20:41:30 +01:00
test_qtmainwin_library Change license for tests files 2024-02-04 09:56:42 +01:00
test_resource_without_obj_lib Change license for tests files 2024-02-04 09:56:42 +01:00
test_standalone_test Change license in test file 2024-02-14 15:23:05 +01:00
test_static_resources Bump version to 6.8.3 2025-01-23 11:04:42 +00:00
test_testlib_definitions Change license for tests files 2024-02-04 09:56:42 +01:00
test_testlib_no_link_gui Use add_compile_definitions instead of add_definitions 2024-07-05 15:55:31 +00:00
test_testlib_no_link_widgets Use add_compile_definitions instead of add_definitions 2024-07-05 15:55:31 +00:00
test_umbrella_config
test_versionless_targets "Simplify" versionless targets 2024-03-12 20:27:42 +01:00
test_widgets_app_deployment Tests: Reduce the number of module includes 2024-11-04 19:42:27 +00:00
test_wrap_cpp_and_resources Change license for tests files 2024-02-04 09:56:42 +01:00
test_wrap_cpp_moc CMake: Use correct project name for test_wrap_cpp_moc 2024-08-01 12:46:22 +00:00
test_wrap_cpp_moc_target CMake: Add new signature to qt6_wrap_cpp 2024-08-05 14:44:07 +00:00
test_wrap_cpp_options Change license for tests files 2024-02-04 09:56:42 +01:00
tst_qaddpreroutine Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt CMake: qt_add_ui: Add sources to target_sources 2024-08-12 17:26:49 +00:00
test_plugin_shared_static_flavor.cmake Change license for tests files 2024-02-04 09:56:42 +01:00