Macro expander: Allow alternative substitution character

The forward slash is a poor choice on Windows for fields containing file
paths, as it gets auto-converted to a backslash when used in a path
chooser.

Fixes: QTCREATORBUG-22276
Change-Id: I1d22d2031909b24c72aad4781995418efd394039
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2019-07-09 16:24:12 +02:00
parent 61b4ef6bfa
commit 14aa0122e6
2 changed files with 10 additions and 3 deletions

View File

@@ -141,6 +141,11 @@
backreferences. For example, if \c %{variable} is \c my123var, then
\c %{variable/(..)(\d+)/\2\1} is expanded to \c {123myvar}.
Instead of the forward slash, you can also use the pound sign (\c #) as
the substitution character. This can be helpful if the value is supposed
to be a file path, in which case forward slashes might get translated
to backslashes on Windows hosts.
To use the default value if the variable is not set, use:
\badcode