QtCreator file template syntax in wizard
-
Hello everyone,
I've started adjusting QtCreator's file templates and it works fine.
The variables in the template files are references with%{var name}
and I couldn't find any doc of generally available vars line "project name" or "timestamp". There's a template for a license file but it has another syntax for getting variable values. Also there're some expressions in those variable references like
%{JS: Cpp.closeNamespaces('%{Class}')}
Has anyone an idea where can I find a reference or a tutorial of what is possible in the wizard?
Best regards,
Yaroslav -
The
%{JS: expr}
substitutions are JavaScript expressions. The value of the JavaScript expression is converted to a string. The JS engine has some additional Creator-specific properties in the global object - see the following SO question for details: http://stackoverflow.com/q/43763488/1329652