forked from qt-creator/qt-creator
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:
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "clangcodemodeltr.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <cppeditor/baseeditordocumentparser.h>
|
||||
|
||||
Reference in New Issue
Block a user