From 41dee83becb19aa5fadae8ef9469216bcab1440c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 20 Sep 2018 01:16:01 +0300 Subject: TextEditor: Modernize override, auto, nullptr, member initializers. Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e Reviewed-by: Eike Ziller --- src/plugins/texteditor/texteditor_test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/plugins/texteditor/texteditor_test.cpp') diff --git a/src/plugins/texteditor/texteditor_test.cpp b/src/plugins/texteditor/texteditor_test.cpp index 78b8564e43..d5ef1a6eea 100644 --- a/src/plugins/texteditor/texteditor_test.cpp +++ b/src/plugins/texteditor/texteditor_test.cpp @@ -126,9 +126,9 @@ void Internal::TextEditorPlugin::testBlockSelectionTransformation() // open editor Core::IEditor *editor = Core::EditorManager::openEditorWithContents( - Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, 0, input.toLatin1()); + Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, nullptr, input.toLatin1()); QVERIFY(editor); - if (BaseTextEditor *textEditor = qobject_cast(editor)) { + if (auto textEditor = qobject_cast(editor)) { TextEditorWidget *editorWidget = textEditor->editorWidget(); editorWidget->setBlockSelection(selection.positionBlock, selection.positionColumn, @@ -349,9 +349,9 @@ void Internal::TextEditorPlugin::testBlockSelectionInsert() // open editor Core::IEditor *editor = Core::EditorManager::openEditorWithContents( - Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, 0, text); + Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, nullptr, text); QVERIFY(editor); - if (BaseTextEditor *textEditor = qobject_cast(editor)) { + if (auto textEditor = qobject_cast(editor)) { TextEditorWidget *editorWidget = textEditor->editorWidget(); editorWidget->setBlockSelection(selection.positionBlock, selection.positionColumn, @@ -427,9 +427,9 @@ void Internal::TextEditorPlugin::testBlockSelectionRemove() // open editor Core::IEditor *editor = Core::EditorManager::openEditorWithContents( - Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, 0, text); + Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, nullptr, text); QVERIFY(editor); - if (BaseTextEditor *textEditor = qobject_cast(editor)) { + if (auto textEditor = qobject_cast(editor)) { TextEditorWidget *editorWidget = textEditor->editorWidget(); editorWidget->setBlockSelection(selection.positionBlock, selection.positionColumn, @@ -482,9 +482,9 @@ void Internal::TextEditorPlugin::testBlockSelectionCopy() // open editor Core::IEditor *editor = Core::EditorManager::openEditorWithContents( - Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, 0, text); + Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, nullptr, text); QVERIFY(editor); - if (BaseTextEditor *textEditor = qobject_cast(editor)) { + if (auto textEditor = qobject_cast(editor)) { TextEditorWidget *editorWidget = textEditor->editorWidget(); editorWidget->setBlockSelection(selection.positionBlock, selection.positionColumn, -- cgit v1.2.1