forked from qt-creator/qt-creator
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:
@@ -340,7 +340,7 @@ static Document::Ptr addDefinition(const Snapshot &docTable,
|
||||
//! \todo use the InsertionPointLocator to insert at the correct place.
|
||||
// (we'll have to extend that class first to do definition insertions)
|
||||
|
||||
const QString contents = editable->contents();
|
||||
const QString contents = editable->textDocument()->contents();
|
||||
int column;
|
||||
editable->convertPosition(contents.length(), line, &column);
|
||||
editable->gotoLine(*line, column);
|
||||
|
||||
Reference in New Issue
Block a user