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 <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-08-30 10:58:08 +02:00
parent 3e1fa0f170
commit 284817fae6
525 changed files with 3705 additions and 4179 deletions

View File

@@ -40,9 +40,9 @@
#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/reaper.h>
#include <cpptools/cppprojectupdater.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/generatedcodemodelsupport.h>
#include <cppeditor/cppeditorconstants.h>
#include <cppeditor/cppprojectupdater.h>
#include <cppeditor/generatedcodemodelsupport.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -93,10 +93,10 @@ static void noAutoAdditionNotify(const FilePaths &filePaths, const ProjectNode *
{
const FilePaths srcPaths = Utils::filtered(filePaths, [](const FilePath &file) {
const auto mimeType = Utils::mimeTypeForFile(file).name();
return mimeType == CppTools::Constants::C_SOURCE_MIMETYPE ||
mimeType == CppTools::Constants::C_HEADER_MIMETYPE ||
mimeType == CppTools::Constants::CPP_SOURCE_MIMETYPE ||
mimeType == CppTools::Constants::CPP_HEADER_MIMETYPE ||
return mimeType == CppEditor::Constants::C_SOURCE_MIMETYPE ||
mimeType == CppEditor::Constants::C_HEADER_MIMETYPE ||
mimeType == CppEditor::Constants::CPP_SOURCE_MIMETYPE ||
mimeType == CppEditor::Constants::CPP_HEADER_MIMETYPE ||
mimeType == ProjectExplorer::Constants::FORM_MIMETYPE ||
mimeType == ProjectExplorer::Constants::RESOURCE_MIMETYPE ||
mimeType == ProjectExplorer::Constants::SCXML_MIMETYPE;
@@ -151,7 +151,7 @@ static Q_LOGGING_CATEGORY(cmakeBuildSystemLog, "qtc.cmake.buildsystem", QtWarnin
CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
: BuildSystem(bc)
, m_cppCodeModelUpdater(new CppTools::CppProjectUpdater)
, m_cppCodeModelUpdater(new CppEditor::CppProjectUpdater)
{
// TreeScanner:
connect(&m_treeScanner, &TreeScanner::finished,