diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2018-09-20 01:16:01 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2018-09-20 08:48:49 +0000 |
commit | 41dee83becb19aa5fadae8ef9469216bcab1440c (patch) | |
tree | 2fd37b0111d0e3b78976fa8f8fbaefff30f49003 /src/plugins/texteditor/texteditor_test.cpp | |
parent | 439bc225e1c0f3d964c8a3da6e9757a821a5944c (diff) | |
download | qt-creator-41dee83becb19aa5fadae8ef9469216bcab1440c.tar.gz |
TextEditor: Modernize
override, auto, nullptr, member initializers.
Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditor_test.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditor_test.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<BaseTextEditor*>(editor)) { + if (auto textEditor = qobject_cast<BaseTextEditor*>(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<BaseTextEditor*>(editor)) { + if (auto textEditor = qobject_cast<BaseTextEditor*>(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<BaseTextEditor*>(editor)) { + if (auto textEditor = qobject_cast<BaseTextEditor*>(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<BaseTextEditor*>(editor)) { + if (auto textEditor = qobject_cast<BaseTextEditor*>(editor)) { TextEditorWidget *editorWidget = textEditor->editorWidget(); editorWidget->setBlockSelection(selection.positionBlock, selection.positionColumn, |