TextEditors: Separate away methods that actually work on a document

Introduces ITextEditorDocument. This is part of a more general "use
documents instead of editors whereever possible". It will allow to move
to e.g. ITextEditor::openedTextDocumentContents() instead of
ITextEditor::openedTextEditorsContents().

Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Eike Ziller
2013-04-18 18:21:17 +02:00
parent e31575a493
commit b450b3071e
20 changed files with 96 additions and 79 deletions

View File

@@ -73,7 +73,7 @@ QString CppEditorSupport::contents()
if (! _textEditor)
return QString();
else if (! _cachedContents.isEmpty())
_cachedContents = _textEditor->contents();
_cachedContents = _textEditor->textDocument()->contents();
return _cachedContents;
}
@@ -112,7 +112,7 @@ void CppEditorSupport::updateDocumentNow()
_updateDocumentTimer->stop();
QStringList sourceFiles(_textEditor->document()->fileName());
_cachedContents = _textEditor->contents();
_cachedContents = _textEditor->textDocument()->contents();
_documentParser = _modelManager->updateSourceFiles(sourceFiles);
}
}