From 3ec59b46df3a5f12d3348a9f435de3b0093ee89b Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 25 Jul 2017 12:32:45 +0200 Subject: [PATCH] TextEditor: Use member initialization in TextEditorFactoryPrivate Change-Id: I97a077a922208545b5a6c7dc07c4de667fa0d833 Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 120e43f46ca..bb58b6659c1 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -8136,13 +8136,7 @@ public: TextEditorFactoryPrivate(TextEditorFactory *parent) : q(parent), m_widgetCreator([]() { return new TextEditorWidget; }), - m_editorCreator([]() { return new BaseTextEditor; }), - m_completionAssistProvider(0), - m_useGenericHighlighter(false), - m_duplicatedSupported(true), - m_codeFoldingSupported(false), - m_paranthesesMatchinEnabled(false), - m_marksVisible(false) + m_editorCreator([]() { return new BaseTextEditor; }) {} BaseTextEditor *duplicateTextEditor(BaseTextEditor *other) @@ -8163,12 +8157,12 @@ public: TextEditorFactory::SyntaxHighLighterCreator m_syntaxHighlighterCreator; CommentDefinition m_commentDefinition; QList m_hoverHandlers; // owned - CompletionAssistProvider * m_completionAssistProvider; // owned - bool m_useGenericHighlighter; - bool m_duplicatedSupported; - bool m_codeFoldingSupported; - bool m_paranthesesMatchinEnabled; - bool m_marksVisible; + CompletionAssistProvider * m_completionAssistProvider = nullptr; // owned + bool m_useGenericHighlighter = false; + bool m_duplicatedSupported = true; + bool m_codeFoldingSupported = false; + bool m_paranthesesMatchinEnabled = false; + bool m_marksVisible = false; }; } /// namespace Internal