CppTools: Break TextDocument dependency of BaseEditorDocumentProcessor

BaseEditorDocumentProcessor was holding a TextEditor::TextDocument but
only used the QTextDocument and the file path.

Change-Id: I349cc95d973adeaf9f94638d84333f592c14e7f9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2016-01-11 20:40:05 +01:00
parent 369b1f7f38
commit 0fca74d501
4 changed files with 14 additions and 19 deletions

View File

@@ -64,7 +64,7 @@ namespace Internal {
ClangEditorDocumentProcessor::ClangEditorDocumentProcessor(
IpcCommunicator &ipcCommunicator,
TextEditor::TextDocument *document)
: BaseEditorDocumentProcessor(document)
: BaseEditorDocumentProcessor(document->document(), document->filePath().toString())
, m_diagnosticManager(document)
, m_ipcCommunicator(ipcCommunicator)
, m_parser(new ClangEditorDocumentParser(document->filePath().toString()))
@@ -344,7 +344,7 @@ ClangEditorDocumentProcessor::fileContainerWithDocumentContent(const QString &pr
{
return ClangBackEnd::FileContainer(filePath(),
projectpartId,
baseTextDocument()->plainText(),
textDocument()->toPlainText(),
true,
revision());
}