From 2a5c602341dd07b146d755f3674fbfc054bce48a Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 27 Aug 2014 11:57:32 +0200 Subject: TextEditor: Introduce some convenience text accessors in the editor And adjust users. Change-Id: I9329257cfa5f3298731deb07c2881bc37d9a051d Reviewed-by: Christian Stenger --- src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp') diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp index 767192982b..b922727983 100644 --- a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp +++ b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp @@ -104,19 +104,18 @@ public: // Open file TextEditor::BaseTextEditor *editor = TextEditor::PlainTextEditorFactory::createPlainTextEditor(); - TextEditor::BaseTextEditorWidget *editorWidget = editor->editorWidget(); QString error; editor->open(&error, document->fileName(), document->fileName()); QVERIFY(error.isEmpty()); // Set cursor position - QTextCursor cursor = editorWidget->textCursor(); + QTextCursor cursor = editor->textCursor(); cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::MoveAnchor, cursorPosition); - editorWidget->setTextCursor(cursor); + editor->setTextCursor(cursor); - QTextDocument *qtextDocument = editorWidget->document(); + QTextDocument *qtextDocument = editor->qdocument(); CppRefactoringFilePtr cppRefactoringFile - = CppRefactoringChanges::file(editorWidget, document); + = CppRefactoringChanges::file(editor->editorWidget(), document); // Prepare for formatting Overview overview; -- cgit v1.2.1