Commit a3f748cc authored by Igor Kushnir's avatar Igor Kushnir Committed by Nicolás Alvarez
Browse files

CustomScriptPreferences: clarify ${PROJECT_NAME} description

Before analyzing the code, I thought that ${PROJECT_NAME} (verbatim) in
a formatter command is replaced by the path of the project, to which the
file being formatted belongs. In fact, the command must contain a
hardcoded name of some concrete project, which must be open for the
replacement to succeed. Obviously such a command cannot be usefully
shared between projects with different names. But at least the true
meaning of this very specialized variable is easier to understand now.
parent 352d971d
Pipeline #95966 passed with stage
in 11 minutes and 7 seconds
......@@ -124,7 +124,7 @@ QString CustomScriptPlugin::formatSourceWithStyle(SourceFormatterStyle style, co
QString command = style.content();
// Replace ${Project} with the project path
// Replace ${<project name>} with the project path
command = replaceVariables(command, projectVariables);
command.replace(QLatin1String("$FILE"), url.toLocalFile());
......@@ -564,8 +564,8 @@ void CustomScriptPreferences::moreVariablesClicked(bool)
"The contents of the file must not be modified, changes are allowed <br />"
"only in $TMPFILE.<br />"
"<br />"
"<b>${PROJECT_NAME}</b> will be replaced by the path of <br />"
"the currently open project with the matching name."
"<b>${&lt;project name&gt;}</b> will be replaced by the path of <br />"
"a currently open project whose name is &lt;project name&gt;."
), i18nc("@title:window", "Variable Replacements"));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment