forked from qt-creator/qt-creator
		
	CppTools: Fix include hierarchy for clang code model
This makes the editor document snapshot accessible through BaseEditorDocumentProcessor since we need it for the include hierarchy if the the clang code model is activated. Task-number: QTCREATORBUG-13553 Change-Id: I7214cc578d05fe5cad6e12b4d29fe6f840a88e8d Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
		| @@ -30,7 +30,7 @@ | ||||
|  | ||||
| #include "cpptoolsplugin.h" | ||||
|  | ||||
| #include "builtineditordocumentparser.h" | ||||
| #include "baseeditordocumentprocessor.h" | ||||
| #include "cppmodelmanager.h" | ||||
| #include "cppsourceprocessertesthelper.h" | ||||
| #include "cppsourceprocessor.h" | ||||
| @@ -143,9 +143,9 @@ void CppToolsPlugin::test_cppsourceprocessor_includes_cyclic() | ||||
|  | ||||
|     // Check editor snapshot | ||||
|     const QString filePath = editor->document()->filePath(); | ||||
|     auto *parser = BuiltinEditorDocumentParser::get(filePath); | ||||
|     QVERIFY(parser); | ||||
|     Snapshot snapshot = parser->snapshot(); | ||||
|     auto *processor = BaseEditorDocumentProcessor::get(filePath); | ||||
|     QVERIFY(processor); | ||||
|     Snapshot snapshot = processor->snapshot(); | ||||
|     QCOMPARE(snapshot.size(), 3); // Configuration file included | ||||
|  | ||||
|     // Check includes | ||||
|   | ||||
		Reference in New Issue
	
	Block a user