qmake: Fix incorrect Info.plist replacement of EXECUTABLE_NAME

The app_bundle_name should be used if it's not empty.
Previously it was only used if it was empty.

Amends 0749ba2c5eacc4822cf9c7a31edf8d70c4ef6064

Fixes: QTBUG-112668
Change-Id: I4a0e8286eabb5156ad62b448afdf7f54cc78a915
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
(cherry picked from commit f00280337bfef7dc035aeeae4801175b120ba4b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2023-04-06 15:09:05 +02:00 committed by Qt Cherry-pick Bot
parent 13c1005c18
commit 3bb806fd12

View File

@ -813,7 +813,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "-e \"s,\\$${ASSETCATALOG_COMPILER_APPICON_NAME}," << iconName << ",g\" "
<< "-e \"s,@EXECUTABLE@," << app_bundle_name << ",g\" "
<< "-e \"s,@LIBRARY@," << plugin_bundle_name << ",g\" "
<< "-e \"s,\\$${EXECUTABLE_NAME}," << (app_bundle_name.isEmpty() ? app_bundle_name : plugin_bundle_name) << ",g\" "
<< "-e \"s,\\$${EXECUTABLE_NAME}," << (!app_bundle_name.isEmpty() ? app_bundle_name : plugin_bundle_name) << ",g\" "
<< "-e \"s,@TYPEINFO@,"<< typeInfo << ",g\" "
<< "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO},"<< typeInfo << ",g\" "
<< ">" << info_plist_out << Qt::endl;