CppEditor: Clean up cpptoolsreuse.{h,cpp}

A lot of code had a more suitable place to live in, some was even
unused.

Change-Id: I36478ef473aa14395a182c9ac5e3738fc93134b6
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2024-06-18 17:43:21 +02:00
parent e3d3af81cb
commit c0bfd9bbd6
29 changed files with 455 additions and 460 deletions

View File

@@ -14,7 +14,10 @@
#include <optional>
namespace Core { class SearchResult; }
namespace Core {
class HelpItem;
class SearchResult;
}
namespace CppEditor { class CppEditorWidget; }
namespace LanguageServerProtocol { class Range; }
namespace ProjectExplorer {

View File

@@ -6,6 +6,8 @@
#include "clangdclient.h"
#include "clangmodelmanagersupport.h"
#include <coreplugin/editormanager/editormanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <cppeditor/cppeditortr.h>
#include <cppeditor/cpplocatorfilter.h>

View File

@@ -47,7 +47,7 @@ Project *projectForCurrentEditor()
return nullptr;
if (ProjectPart::ConstPtr projectPart = projectPartForFile(filePath))
return projectForProjectPart(*projectPart);
return projectPart->project();
return nullptr;
}
@@ -80,7 +80,7 @@ void disableDiagnosticInCurrentProjectConfig(const ClangDiagnostic &diagnostic)
// Get config
ClangDiagnosticConfig config = diagnosticConfig();
ClangDiagnosticConfigsModel configsModel = CppEditor::diagnosticConfigsModel();
ClangDiagnosticConfigsModel configsModel = ClangdSettings::diagnosticConfigsModel();
// Create copy if needed
if (config.isReadOnly()) {

View File

@@ -5,6 +5,7 @@
#include "clangcodemodeltr.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <cppeditor/baseeditordocumentparser.h>