From 55b63a406fced6c4db0e18a7170932de1c6a5c21 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 25 Sep 2012 14:39:45 +0200 Subject: [PATCH] Make sure the path is quoted in case it has spaces in it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a problem when the preprocessing scripts were called from a path with spaces in it. Task-number: QTBUG-15317 Change-Id: I92ea85e12e2f9abfc262a8dcaa4f414e471e468c Reviewed-by: João Abecasis Reviewed-by: Joerg Bornemann --- qmake/generators/mac/pbuilder_pbx.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 7350b3220e..c538814ac4 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -63,6 +63,8 @@ QT_BEGIN_NAMESPACE // Note: this is fairly hacky, but it does the job... +using namespace QMakeInternal; + static QString qtMD5(const QByteArray &src) { QByteArray digest = QCryptographicHash::hash(src, QCryptographicHash::Md5); @@ -526,7 +528,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("name", "Qt Qmake") << ";" << "\n" << "\t\t\t" << writeSettings("neededFileNames", ProStringList(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";" << "\n" - << "\t\t\t" << writeSettings("shellScript", fixForOutput("make -C " + escapeFilePath(qmake_getpwd()) + " -f '" + escapeFilePath(mkfile) + "'")) << ";" << "\n" + << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -778,7 +780,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";" << "\n" << "\t\t\t" << writeSettings("neededFileNames", fixListForOutput("QMAKE_PBX_OBJ"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";" << "\n" - << "\t\t\t" << writeSettings("shellScript", fixForOutput("make -C " + escapeFilePath(qmake_getpwd()) + " -f '" + escapeFilePath(mkfile) + "'")) << ";" << "\n" + << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -958,7 +960,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("name", "Qt Sublibs") << ";" << "\n" << "\t\t\t" << writeSettings("neededFileNames", ProStringList(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << "\n" - << "\t\t\t" << writeSettings("shellScript", fixForOutput("make -C " + escapeFilePath(qmake_getpwd()) + " -f '" + escapeFilePath(mkfile) + "'")) << ";" << "\n" + << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" << "\t\t" << "};" << "\n"; } //LIBRARY BUILDPHASE