From 575ca89b3e2a48a3cabedfec55f32e21fdb2f18d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 19 Oct 2021 15:00:19 +0200 Subject: [PATCH] CppEditor: Do not save clangd file path in settings ... if it is the default value. Change-Id: I5efde72abe5a1979144352d09d461642f936224a Reviewed-by: David Schulz --- src/plugins/cppeditor/cppcodemodelsettings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/cppcodemodelsettings.cpp b/src/plugins/cppeditor/cppcodemodelsettings.cpp index 1a7cf1255f8..66c07bed7a1 100644 --- a/src/plugins/cppeditor/cppcodemodelsettings.cpp +++ b/src/plugins/cppeditor/cppcodemodelsettings.cpp @@ -402,7 +402,8 @@ QVariantMap ClangdSettings::Data::toMap() const { QVariantMap map; map.insert(useClangdKey(), useClangd); - map.insert(clangdPathKey(), executableFilePath.toString()); + if (executableFilePath != fallbackClangdFilePath()) + map.insert(clangdPathKey(), executableFilePath.toString()); map.insert(clangdIndexingKey(), enableIndexing); map.insert(clangdThreadLimitKey(), workerThreadLimit); map.insert(clangdDocumentThresholdKey(), documentUpdateThreshold);