aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-09-28 16:18:44 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-10-02 07:49:08 +0000
commitb55825a42000ee81e37c8e25bcd0784d26d6dc18 (patch)
tree9ce2aca3b17affd9cb74b98f002ccf76ab8a682e /doc
parentda8db0f24dcc094d12f28e4cc342a2efb755d5cf (diff)
ProjectExplorer: Clean up variables
Global variables with names such as "CurrentProject*", "CurrentKit*" etc are harmful, because the term "current project" as used in Qt Creator does not refer to the "active project", but simply stands for the project that contains the node that is currently selected in the project tree, which in turn may or may not correspond to the current editor document, depending on the "sync with editor" setting. In other words, the "current project" is almost a random value with little meaning outside the project tree itself. Therefore, we remove "CurrentProject*" and friends, except the ones that are currently intentionally in use. The latter get renamed to "CurrentDocument:Project*", so their purpose becomes clear. Their old names are kept around for backward compatibility, but are not suggested by the variable chooser anymore, so new usages are unlikely and we can remove them at some point. We also add some ActiveProject* variants that have been requested in the past. Also remove the "CurrentSession" prefix that was deprecated six years ago. Fixes: QTCREATORBUG-12724 Fixes: QTCREATORBUG-24606 Change-Id: Ibba5d0e0ce3d2beb444a5eec01fbb9b745d90a1d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/qtcreator/src/editors/creator-code-completion.qdoc5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/qtcreator/src/editors/creator-code-completion.qdoc b/doc/qtcreator/src/editors/creator-code-completion.qdoc
index c21ebef7b3..7d7b627eb3 100644
--- a/doc/qtcreator/src/editors/creator-code-completion.qdoc
+++ b/doc/qtcreator/src/editors/creator-code-completion.qdoc
@@ -230,8 +230,9 @@
%{variable}
\endcode
- For example, the following variable expands to the name of the current
- project: \c {%{CurrentProject:Name}}.
+ For example, the following variable expands to the name of the
+ project containing the file that is currently open in the editor:
+ \c {%{CurrentDocument:Project:Name}}.
Use unique variable names within a snippet, because all instances of a
variable are renamed when you specify a value for it.