From 3b9f103155da1fbededb267319359ae988d3d1f4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 12 Nov 2014 10:21:29 +0100 Subject: make fallback handling for QMAKE_BUNDLE_EXTENSION sane the logic was such that if the bundle name already had the specified extension which was not the default extension, the default extension would be appended, too. i don't think that was the intention ... now we simply put the default into QMAKE_BUNDLE_EXTENSION if its empty - the variable is not used anywhere else where it would be expected to preserve its emptiness, so this is safe. Change-Id: Ied34d10f9fe60756bddc0037dcb2f1d3bbfd3e12 Reviewed-by: Joerg Bornemann --- qmake/generators/unix/unixmake.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index b3acbd8d0d..650d6a2666 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -281,19 +281,19 @@ UnixMakefileGenerator::init() if(project->isActiveConfig("plugin")) { if(!project->isEmpty("QMAKE_PLUGIN_BUNDLE_NAME")) bundle = unescapeFilePath(project->first("QMAKE_PLUGIN_BUNDLE_NAME")); - if(!project->isEmpty("QMAKE_BUNDLE_EXTENSION") && !bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION"))) + if (project->isEmpty("QMAKE_BUNDLE_EXTENSION")) + project->values("QMAKE_BUNDLE_EXTENSION").append(".plugin"); + if (!bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION"))) bundle += project->first("QMAKE_BUNDLE_EXTENSION"); - else if(!bundle.endsWith(".plugin")) - bundle += ".plugin"; if(project->isEmpty("QMAKE_BUNDLE_LOCATION")) project->values("QMAKE_BUNDLE_LOCATION").append("Contents/MacOS"); } else { if(!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME")) bundle = unescapeFilePath(project->first("QMAKE_FRAMEWORK_BUNDLE_NAME")); - if(!project->isEmpty("QMAKE_BUNDLE_EXTENSION") && !bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION"))) + if (project->isEmpty("QMAKE_BUNDLE_EXTENSION")) + project->values("QMAKE_BUNDLE_EXTENSION").append(".framework"); + if (!bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION"))) bundle += project->first("QMAKE_BUNDLE_EXTENSION"); - else if(!bundle.endsWith(".framework")) - bundle += ".framework"; } } if(!bundle.isEmpty()) { -- cgit v1.2.3