summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2022-11-17 12:58:03 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2022-11-21 08:57:40 +0000
commit0f2db176fafe6b981f4fb8d35d7d7070dad3d92a (patch)
tree36e1aa3b76c0289de0e5d7ea64fa6ae7d9f41a61
parent04116b89df0e69780046ec1e4ee4fbea493bccfb (diff)
downloadqt-creator-0f2db176fafe6b981f4fb8d35d7d7070dad3d92a.tar.gz
ClangCodeModel: Re-enable renaming via clangd
... for clangd >= 16, which has the configurable rename limit. Still allow users to opt out for now. Change-Id: I86d6809b66ffbf80245b61cf57c648842d2e17af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--src/plugins/clangcodemodel/clangdclient.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp
index db76cd5698..2e61fa1819 100644
--- a/src/plugins/clangcodemodel/clangdclient.cpp
+++ b/src/plugins/clangcodemodel/clangdclient.cpp
@@ -489,9 +489,8 @@ void ClangdClient::findUsages(TextDocument *document, const QTextCursor &cursor,
if (searchTerm.isEmpty())
return;
- // Will fix QTCREATORBUG-27978 and QTCREATORBUG-28109 once enabled by default.
if (replacement && versionNumber() >= QVersionNumber(16)
- && Utils::qtcEnvironmentVariableIsSet("QTC_CLANGD_RENAMING")) {
+ && Utils::qtcEnvironmentVariable("QTC_CLANGD_RENAMING") != "0") {
symbolSupport().renameSymbol(document, adjustedCursor, *replacement,
CppEditor::preferLowerCaseFileNames());
return;