From bd9ecfc41a14a1d6a32154d2876e041c65f78e8b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 2 May 2022 17:39:35 +0200 Subject: [PATCH] MinimizableInfoBars: Move constants from global to local Change-Id: I7728ba8a81724d60797758e7b50e71ed1a22750c Reviewed-by: Reviewed-by: Christian Kandeler Reviewed-by: Qt CI Bot --- src/plugins/cppeditor/cppeditorconstants.h | 1 - src/plugins/cppeditor/cppminimizableinfobars.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/cppeditor/cppeditorconstants.h b/src/plugins/cppeditor/cppeditorconstants.h index 0586a966a52..19d6fa6de2c 100644 --- a/src/plugins/cppeditor/cppeditorconstants.h +++ b/src/plugins/cppeditor/cppeditorconstants.h @@ -38,7 +38,6 @@ const char SWITCH_DECLARATION_DEFINITION[] = "CppEditor.SwitchDeclarationDefinit const char OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT[] = "CppEditor.OpenDeclarationDefinitionInNextSplit"; const char OPEN_PREPROCESSOR_DIALOG[] = "CppEditor.OpenPreprocessorDialog"; const char MULTIPLE_PARSE_CONTEXTS_AVAILABLE[] = "CppEditor.MultipleParseContextsAvailable"; -const char NO_PROJECT_CONFIGURATION[] = "CppEditor.NoProjectConfiguration"; const char M_REFACTORING_MENU_INSERTION_POINT[] = "CppEditor.RefactorGroup"; const char UPDATE_CODEMODEL[] = "CppEditor.UpdateCodeModel"; const char INSPECT_CPP_CODEMODEL[] = "CppEditor.InspectCppCodeModel"; diff --git a/src/plugins/cppeditor/cppminimizableinfobars.cpp b/src/plugins/cppeditor/cppminimizableinfobars.cpp index 94c0410aa5a..638dd04a8de 100644 --- a/src/plugins/cppeditor/cppminimizableinfobars.cpp +++ b/src/plugins/cppeditor/cppminimizableinfobars.cpp @@ -25,7 +25,6 @@ #include "cppminimizableinfobars.h" -#include "cppeditorconstants.h" #include "cpptoolssettings.h" #include @@ -34,6 +33,8 @@ #include #include +const char NO_PROJECT_CONFIGURATION[] = "CppEditor.NoProjectConfiguration"; + using namespace Utils; namespace CppEditor { @@ -57,8 +58,7 @@ void MinimizableInfoBars::createActions() action->setIcon(Icons::WARNING_TOOLBAR.pixmap()); connect(action, &QAction::triggered, []() { settings()->setShowNoProjectInfoBar(true); }); action->setVisible(!settings()->showNoProjectInfoBar()); - m_actions.insert(Constants::NO_PROJECT_CONFIGURATION, action); - + m_actions.insert(NO_PROJECT_CONFIGURATION, action); } void MinimizableInfoBars::createShowInfoBarActions(const ActionCreator &actionCreator) const @@ -84,7 +84,7 @@ void MinimizableInfoBars::processHasProjectPart(bool hasProjectPart) void MinimizableInfoBars::updateNoProjectConfiguration() { - const Id id(Constants::NO_PROJECT_CONFIGURATION); + const Id id(NO_PROJECT_CONFIGURATION); m_infoBar.removeInfo(id); bool show = false;