qmake: fix execution of depend_command in directories with funny names
it's wrong to use the escape function for makefiles, as the command goes directly to a popen() call. Task-number: QTBUG-57343 Change-Id: I34a8e4d8fb406303c593e7c1e24019e0f756e7f8 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
parent
1e4054ce2f
commit
e3ca4287d9
@ -1839,7 +1839,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
QString dep_cd_cmd;
|
QString dep_cd_cmd;
|
||||||
if (!tmp_dep_cmd.isEmpty()) {
|
if (!tmp_dep_cmd.isEmpty()) {
|
||||||
dep_cd_cmd = QLatin1String("cd ")
|
dep_cd_cmd = QLatin1String("cd ")
|
||||||
+ escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
|
+ IoUtils::shellQuote(Option::fixPathToLocalOS(Option::output_dir, false))
|
||||||
+ QLatin1String(" && ");
|
+ QLatin1String(" && ");
|
||||||
}
|
}
|
||||||
const ProStringList &vars = project->values(ProKey(*it + ".variables"));
|
const ProStringList &vars = project->values(ProKey(*it + ".variables"));
|
||||||
|
@ -29,10 +29,15 @@
|
|||||||
#include "msvc_objectmodel.h"
|
#include "msvc_objectmodel.h"
|
||||||
#include "msvc_vcproj.h"
|
#include "msvc_vcproj.h"
|
||||||
#include "msvc_vcxproj.h"
|
#include "msvc_vcxproj.h"
|
||||||
|
|
||||||
|
#include <ioutils.h>
|
||||||
|
|
||||||
#include <qscopedpointer.h>
|
#include <qscopedpointer.h>
|
||||||
#include <qstringlist.h>
|
#include <qstringlist.h>
|
||||||
#include <qfileinfo.h>
|
#include <qfileinfo.h>
|
||||||
|
|
||||||
|
using namespace QMakeInternal;
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
// XML Tags ---------------------------------------------------------
|
// XML Tags ---------------------------------------------------------
|
||||||
@ -2318,7 +2323,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
|||||||
tmp_dep_cmd, inFile, out, MakefileGenerator::LocalShell);
|
tmp_dep_cmd, inFile, out, MakefileGenerator::LocalShell);
|
||||||
if(Project->canExecute(dep_cmd)) {
|
if(Project->canExecute(dep_cmd)) {
|
||||||
dep_cmd.prepend(QLatin1String("cd ")
|
dep_cmd.prepend(QLatin1String("cd ")
|
||||||
+ Project->escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
|
+ IoUtils::shellQuote(Option::fixPathToLocalOS(Option::output_dir, false))
|
||||||
+ QLatin1String(" && "));
|
+ QLatin1String(" && "));
|
||||||
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
||||||
QString indeps;
|
QString indeps;
|
||||||
|
@ -29,16 +29,22 @@
|
|||||||
#include "msvc_vcproj.h"
|
#include "msvc_vcproj.h"
|
||||||
#include "option.h"
|
#include "option.h"
|
||||||
#include "xmloutput.h"
|
#include "xmloutput.h"
|
||||||
|
|
||||||
|
#include <ioutils.h>
|
||||||
|
|
||||||
#include <qdir.h>
|
#include <qdir.h>
|
||||||
#include <qdiriterator.h>
|
#include <qdiriterator.h>
|
||||||
#include <qcryptographichash.h>
|
#include <qcryptographichash.h>
|
||||||
#include <qregexp.h>
|
#include <qregexp.h>
|
||||||
#include <qhash.h>
|
#include <qhash.h>
|
||||||
#include <quuid.h>
|
#include <quuid.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
//#define DEBUG_SOLUTION_GEN
|
//#define DEBUG_SOLUTION_GEN
|
||||||
|
|
||||||
|
using namespace QMakeInternal;
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
// Filter GUIDs (Do NOT change these!) ------------------------------
|
// Filter GUIDs (Do NOT change these!) ------------------------------
|
||||||
const char _GUIDSourceFiles[] = "{4FC737F1-C7A5-4376-A066-2A32D752A2FF}";
|
const char _GUIDSourceFiles[] = "{4FC737F1-C7A5-4376-A066-2A32D752A2FF}";
|
||||||
@ -1550,7 +1556,7 @@ void VcprojGenerator::initResourceFiles()
|
|||||||
dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
|
dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
|
||||||
if(canExecute(dep_cmd)) {
|
if(canExecute(dep_cmd)) {
|
||||||
dep_cmd.prepend(QLatin1String("cd ")
|
dep_cmd.prepend(QLatin1String("cd ")
|
||||||
+ escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
|
+ IoUtils::shellQuote(Option::fixPathToLocalOS(Option::output_dir, false))
|
||||||
+ QLatin1String(" && "));
|
+ QLatin1String(" && "));
|
||||||
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
||||||
QString indeps;
|
QString indeps;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user