summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-04-26 10:55:24 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-05-17 10:01:57 +0000
commit864ba0382fcc3b88508d3b135c797c2ada49342d (patch)
tree41145b969ba826c4f3bd7dfe0d7bcae1a7fa8db4
parent316de840003c1d71a1cf0e89299e2ab82fb0cdce (diff)
downloadqtbase-864ba0382fcc3b88508d3b135c797c2ada49342d.tar.gz
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) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 1da0cbf336..a2668849ba 100644
--- a/src/corelib/Qt6AndroidMacros.cmake
+++ b/src/corelib/Qt6AndroidMacros.cmake
@@ -840,6 +840,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}"