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:
@@ -34,6 +34,7 @@
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cppsourceprocessertesthelper.h"
|
||||
#include "cppsourceprocessor.h"
|
||||
#include "cpptoolsbridge.h"
|
||||
#include "cpptoolstestcase.h"
|
||||
#include "editordocumenthandle.h"
|
||||
|
||||
@@ -135,7 +136,7 @@ void CppToolsPlugin::test_cppsourceprocessor_includes_cyclic()
|
||||
|
||||
// Check editor snapshot
|
||||
const QString filePath = editor->document()->filePath().toString();
|
||||
auto *processor = BaseEditorDocumentProcessor::get(filePath);
|
||||
auto *processor = CppToolsBridge::baseEditorDocumentProcessor(filePath);
|
||||
QVERIFY(processor);
|
||||
QVERIFY(TestCase::waitForProcessedEditorDocument(filePath));
|
||||
Snapshot snapshot = processor->snapshot();
|
||||
|
||||
Reference in New Issue
Block a user