summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppsourceprocessor_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppsourceprocessor_test.cpp')
-rw-r--r--src/plugins/cpptools/cppsourceprocessor_test.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/cpptools/cppsourceprocessor_test.cpp b/src/plugins/cpptools/cppsourceprocessor_test.cpp
index af59cd8334..9b14594954 100644
--- a/src/plugins/cpptools/cppsourceprocessor_test.cpp
+++ b/src/plugins/cpptools/cppsourceprocessor_test.cpp
@@ -33,8 +33,8 @@
#include "cppmodelmanager.h"
#include "cppsourceprocessertesthelper.h"
#include "cppsourceprocessor.h"
-#include "cpptoolseditorsupport.h"
#include "cpptoolstestcase.h"
+#include "editordocumenthandle.h"
#include <texteditor/basetexteditor.h>
@@ -140,13 +140,11 @@ void CppToolsPlugin::test_cppsourceprocessor_includes_cyclic()
QVERIFY(testCase.openBaseTextEditor(fileName1, &editor));
testCase.closeEditorAtEndOfTestCase(editor);
- // Get editor snapshot
- CppEditorSupport *cppEditorSupport = CppModelManagerInterface::instance()
- ->cppEditorSupport(editor);
- QVERIFY(cppEditorSupport);
- BuiltinEditorDocumentParser::Ptr documentParser = cppEditorSupport->documentParser();
- QVERIFY(documentParser);
- Snapshot snapshot = documentParser->snapshot();
+ // Check editor snapshot
+ const QString filePath = editor->document()->filePath();
+ BuiltinEditorDocumentParser *parser = BuiltinEditorDocumentParser::get(filePath);
+ QVERIFY(parser);
+ Snapshot snapshot = parser->snapshot();
QCOMPARE(snapshot.size(), 3); // Configuration file included
// Check includes