Xcode: Quote variable names with invalid characters in them
Allows us to have scoped variables such as eg FOO[arch=armv7]. We could quote all variables, but Xcode doesn't, and we try to stay close to the native behavior. Change-Id: Ia6634a33e42031fe7e69c4f680803fa347e5de4a Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
e8af66f906
commit
2ff3cbbb56
@ -1804,7 +1804,10 @@ ProjectBuilderMakefileGenerator::writeSettings(const QString &var, const ProStri
|
|||||||
for(int i = 0; i < indent_level; ++i)
|
for(int i = 0; i < indent_level; ++i)
|
||||||
newline += "\t";
|
newline += "\t";
|
||||||
|
|
||||||
ret += var + " = ";
|
static QRegExp allowedVariableCharacters("^[a-zA-Z0-9_]*$");
|
||||||
|
ret += var.contains(allowedVariableCharacters) ? var : quotedStringLiteral(var);
|
||||||
|
|
||||||
|
ret += " = ";
|
||||||
|
|
||||||
if(flags & SettingsAsList) {
|
if(flags & SettingsAsList) {
|
||||||
ret += "(" + newline;
|
ret += "(" + newline;
|
||||||
|
Loading…
Reference in New Issue
Block a user