aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/macroexpander.h
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 /src/libs/utils/macroexpander.h
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 'src/libs/utils/macroexpander.h')
-rw-r--r--src/libs/utils/macroexpander.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/utils/macroexpander.h b/src/libs/utils/macroexpander.h
index 70448069c51..e0a330956c9 100644
--- a/src/libs/utils/macroexpander.h
+++ b/src/libs/utils/macroexpander.h
@@ -68,7 +68,7 @@ public:
using IntFunction = std::function<int()>;
void registerPrefix(const QByteArray &prefix,
- const QString &description, const PrefixFunction &value);
+ const QString &description, const PrefixFunction &value, bool visible = true);
void registerVariable(const QByteArray &variable,
const QString &description, const StringFunction &value,