summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-04-26 10:55:24 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2023-05-14 16:01:33 +0000
commitb90c9b8655343d92e381a3004ec1f567d9905619 (patch)
tree7d9b7f3213d874c0bcc8bb1b8bb08fc3cb7fcd76
parent13ecf9141da816ccb85847e61e263290b390d7ff (diff)
Check if next property in the list is not empty before adding a comma
Property merging genex only checks if previous value is not empty, but doesn't check if an actual value that we concatenate is not empty too. Add the check to make sure we don't have trailing comma in the json lists. Fixes: QTBUG-112885 Change-Id: I1a5265ddf1b12f763650daf3c6e3538ed52a1674 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit a3cb388eaa6f50ce70e96bd413a19da5dc7c906c)
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake
index 7aefc29ef2..46c81d47b9 100644
--- a/src/corelib/Qt6AndroidMacros.cmake
+++ b/src/corelib/Qt6AndroidMacros.cmake
@@ -837,6 +837,9 @@ function(_qt_internal_add_android_deployment_list_property out_var json_key)
set(add_quote_genex
"$<$<BOOL:${property_genex}>:\">"
)
+
+ # Add comma only if next property genex contains non-empty value.
+ set(add_comma_genex "$<$<BOOL:${property_genex}>:${add_comma_genex}>")
string(JOIN "" list_join_genex
"${list_join_genex}"
"${add_comma_genex}${add_quote_genex}"