forked from qt-creator/qt-creator
CppTools: CppHighlightingSupport takes a BaseTextDocument
...instead an ITextEditor. The ITextEditor was only used to access the file path and QTextDocument via the BaseTextEditorWidget. Change-Id: Idef2b8162b992fe3718e16e2a046e2ff214846f2 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -895,15 +895,13 @@ CppCompletionAssistProvider *CppModelManager::completionAssistProvider(const QSt
|
||||
return cms->completionAssistProvider();
|
||||
}
|
||||
|
||||
CppHighlightingSupport *CppModelManager::highlightingSupport(Core::IEditor *editor) const
|
||||
CppHighlightingSupport *CppModelManager::highlightingSupport(
|
||||
TextEditor::BaseTextDocument *baseTextDocument) const
|
||||
{
|
||||
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor *>(editor);
|
||||
if (!textEditor)
|
||||
return 0;
|
||||
|
||||
ModelManagerSupport *cms = modelManagerSupportForMimeType(editor->document()->mimeType());
|
||||
|
||||
return cms->highlightingSupport(textEditor);
|
||||
QTC_ASSERT(baseTextDocument, return 0);
|
||||
ModelManagerSupport *cms = modelManagerSupportForMimeType(baseTextDocument->mimeType());
|
||||
QTC_ASSERT(cms, return 0);
|
||||
return cms->highlightingSupport(baseTextDocument);
|
||||
}
|
||||
|
||||
void CppModelManager::setIndexingSupport(CppIndexingSupport *indexingSupport)
|
||||
|
||||
Reference in New Issue
Block a user