forked from qt-creator/qt-creator
make $$shell_{path,quote}() use correct path separator
follow suit with qmake ... Change-Id: I0221f6c81bc770c37f501d79c31860549c0c0076 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -1009,7 +1009,7 @@ ProStringList QMakeEvaluator::evaluateExpandFunction(
|
||||
evalError(fL1S("shell_path(path) requires one argument."));
|
||||
} else {
|
||||
QString rstr = args.at(0).toQString(m_tmp1);
|
||||
if (m_option->dir_sep.at(0) != QLatin1Char('/'))
|
||||
if (m_dirSep.startsWith(QLatin1Char('\\')))
|
||||
rstr.replace(QLatin1Char('/'), QLatin1Char('\\'));
|
||||
else
|
||||
rstr.replace(QLatin1Char('\\'), QLatin1Char('/'));
|
||||
@@ -1029,7 +1029,7 @@ ProStringList QMakeEvaluator::evaluateExpandFunction(
|
||||
evalError(fL1S("shell_quote(arg) requires one argument."));
|
||||
} else {
|
||||
QString rstr = args.at(0).toQString(m_tmp1);
|
||||
if (m_option->dir_sep.at(0) != QLatin1Char('/'))
|
||||
if (m_dirSep.startsWith(QLatin1Char('\\')))
|
||||
rstr = IoUtils::shellQuoteWin(rstr);
|
||||
else
|
||||
rstr = IoUtils::shellQuoteUnix(rstr);
|
||||
|
@@ -201,6 +201,7 @@ void QMakeEvaluator::initFrom(const QMakeEvaluator &other)
|
||||
m_qmakespecName = other.m_qmakespecName;
|
||||
m_mkspecPaths = other.m_mkspecPaths;
|
||||
m_featureRoots = other.m_featureRoots;
|
||||
m_dirSep = other.m_dirSep;
|
||||
}
|
||||
|
||||
//////// Evaluator tools /////////
|
||||
@@ -1105,6 +1106,8 @@ bool QMakeEvaluator::loadSpec()
|
||||
if (!evaluateFeatureFile(QLatin1String("spec_post.prf")))
|
||||
return false;
|
||||
updateFeaturePaths(); // The spec extends the feature search path, so rebuild the cache.
|
||||
// The MinGW and x-build specs may change the separator; $$shell_{path,quote}() need it
|
||||
m_dirSep = first(ProKey("QMAKE_DIR_SEP"));
|
||||
if (!m_conffile.isEmpty()
|
||||
&& !evaluateFileDirect(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
||||
return false;
|
||||
|
@@ -233,6 +233,7 @@ public:
|
||||
QStringList m_qmakefeatures;
|
||||
QStringList m_mkspecPaths;
|
||||
QStringList m_featureRoots;
|
||||
ProString m_dirSep;
|
||||
ProFunctionDefs m_functionDefs;
|
||||
ProStringList m_returnValue;
|
||||
QStack<ProValueMap> m_valuemapStack; // VariableName must be us-ascii, the content however can be non-us-ascii.
|
||||
|
Reference in New Issue
Block a user