forked from qt-creator/qt-creator
CppTools: Add CppToolsBridge
We broke the dependency of BaseEditorDocumentProcessor *BaseEditorDocumentProcessor::get(const QString &filePath) It's hiding static calls and it is much easier to do it that way than to provide a reference to every user. It's also possible to exchange it with different implementations for different test cases. Change-Id: Ic74699b45948e8b48f7efb6a1b295ba2641b8951 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <cpptools/baseeditordocumentprocessor.h>
|
||||
#include <cpptools/cppcodemodelinspectordumper.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <cpptools/cpptoolsbridge.h>
|
||||
#include <cpptools/cppworkingcopy.h>
|
||||
#include <projectexplorer/project.h>
|
||||
|
||||
@@ -1367,7 +1368,7 @@ void CppCodeModelInspectorDialog::refresh()
|
||||
if (editor) {
|
||||
const QString editorFilePath = editor->document()->filePath().toString();
|
||||
cppEditorDocument = cmmi->cppEditorDocument(editorFilePath);
|
||||
if (auto *documentProcessor = BaseEditorDocumentProcessor::get(editorFilePath)) {
|
||||
if (auto *documentProcessor = CppToolsBridge::baseEditorDocumentProcessor(editorFilePath)) {
|
||||
const Snapshot editorSnapshot = documentProcessor->snapshot();
|
||||
m_snapshotInfos->append(SnapshotInfo(editorSnapshot, SnapshotInfo::EditorSnapshot));
|
||||
const QString editorSnapshotTitle
|
||||
|
||||
Reference in New Issue
Block a user