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:
@@ -121,7 +121,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
|
||||
, m_initialized(false)
|
||||
, m_lastHighlightRevision(0)
|
||||
, m_lastHighlightOnCompleteSemanticInfo(true)
|
||||
, m_highlightingSupport(modelManager->highlightingSupport(textEditor))
|
||||
, m_highlightingSupport(modelManager->highlightingSupport(textEditor->baseTextDocument()))
|
||||
, m_completionAssistProvider(
|
||||
modelManager->completionAssistProvider(textEditor->document()->mimeType()))
|
||||
{
|
||||
@@ -595,7 +595,8 @@ void CppEditorSupport::onMimeTypeChanged()
|
||||
m_highlighter.cancel();
|
||||
m_highlighter.waitForFinished();
|
||||
|
||||
m_highlightingSupport.reset(m_modelManager->highlightingSupport(m_textEditor));
|
||||
m_highlightingSupport.reset(
|
||||
m_modelManager->highlightingSupport(m_textEditor->baseTextDocument()));
|
||||
|
||||
disconnect(this, SIGNAL(semanticInfoUpdated(CppTools::SemanticInfo)),
|
||||
this, SLOT(startHighlighting()));
|
||||
|
||||
Reference in New Issue
Block a user