diff options
author | Christian Kandeler <[email protected]> | 2021-08-30 10:58:08 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2021-09-01 14:53:58 +0000 |
commit | 284817fae6514701902ccdb834c2faa46462f2e8 (patch) | |
tree | 44a8c7d9813dc110b61c4639036366c7696bd7e9 /src/plugins/clangcodemodel/clangcodemodelplugin.cpp | |
parent | 3e1fa0f170d523971d2c3c12da15a6e291f56511 (diff) |
Merge CppTools into CppEditor
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.
Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/clangcodemodel/clangcodemodelplugin.cpp')
-rw-r--r-- | src/plugins/clangcodemodel/clangcodemodelplugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/clangcodemodel/clangcodemodelplugin.cpp b/src/plugins/clangcodemodel/clangcodemodelplugin.cpp index 4f047f36afd..ced0fa8e35a 100644 --- a/src/plugins/clangcodemodel/clangcodemodelplugin.cpp +++ b/src/plugins/clangcodemodel/clangcodemodelplugin.cpp @@ -40,7 +40,7 @@ #include <coreplugin/messagemanager.h> #include <coreplugin/progressmanager/progressmanager.h> -#include <cpptools/cppmodelmanager.h> +#include <cppeditor/cppmodelmanager.h> #include <projectexplorer/buildconfiguration.h> #include <projectexplorer/projectpanelfactory.h> @@ -70,7 +70,7 @@ static void addProjectPanelWidget() void ClangCodeModelPlugin::generateCompilationDB() { - using namespace CppTools; + using namespace CppEditor; ProjectExplorer::Target *target = ProjectExplorer::SessionManager::startupTarget(); if (!target) @@ -91,7 +91,7 @@ void ClangCodeModelPlugin::generateCompilationDB() static bool isDBGenerationEnabled(ProjectExplorer::Project *project) { - using namespace CppTools; + using namespace CppEditor; if (!project) return false; const ProjectInfo::ConstPtr projectInfo = CppModelManager::instance()->projectInfo(project); @@ -116,7 +116,7 @@ bool ClangCodeModelPlugin::initialize(const QStringList &arguments, QString *err this, &ClangCodeModelPlugin::maybeHandleBatchFileAndExit); - CppTools::CppModelManager::instance()->activateClangCodeModel(&m_modelManagerSupportProvider); + CppEditor::CppModelManager::instance()->activateClangCodeModel(&m_modelManagerSupportProvider); addProjectPanelWidget(); @@ -167,7 +167,7 @@ void ClangCodeModelPlugin::createCompilationDBButton() m_generateCompilationDBAction->setEnabled(false); generateCompilationDB(); }); - connect(CppTools::CppModelManager::instance(), &CppTools::CppModelManager::projectPartsUpdated, + connect(CppEditor::CppModelManager::instance(), &CppEditor::CppModelManager::projectPartsUpdated, this, [this](ProjectExplorer::Project *project) { if (project != ProjectExplorer::SessionManager::startupProject()) return; |