From eacaf93a594e8f4491bf69e7b95a8ffada66034f Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 15 Oct 2014 00:36:39 +0200 Subject: TextEditor: Factory cosmetics Pimpl, add some convenience setters. Change-Id: I525c080179fddab6fe2bd2270505fdbf33e56be2 Reviewed-by: David Schulz --- src/plugins/pythoneditor/pythoneditor.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'src/plugins/pythoneditor/pythoneditor.cpp') diff --git a/src/plugins/pythoneditor/pythoneditor.cpp b/src/plugins/pythoneditor/pythoneditor.cpp index ddd80c10c0..a04a4d6fb2 100644 --- a/src/plugins/pythoneditor/pythoneditor.cpp +++ b/src/plugins/pythoneditor/pythoneditor.cpp @@ -45,26 +45,6 @@ using namespace TextEditor; namespace PythonEditor { namespace Internal { -// -// PythonEditorWidget -// - -class PythonEditorWidget : public TextEditorWidget -{ -public: - PythonEditorWidget() - { - setParenthesesMatchingEnabled(true); - setMarksVisible(true); - setCodeFoldingSupported(true); - } -}; - - -// -// PythonEditorFactory -// - PythonEditorFactory::PythonEditorFactory() { setId(Constants::C_PYTHONEDITOR_ID); @@ -76,10 +56,12 @@ PythonEditorFactory::PythonEditorFactory() | TextEditorActionHandler::UnCollapseAll); setDocumentCreator([]() { return new TextDocument(Constants::C_PYTHONEDITOR_ID); }); - setEditorWidgetCreator([]() { return new PythonEditorWidget; }); setIndenterCreator([]() { return new PythonIndenter; }); setSyntaxHighlighterCreator([]() { return new PythonHighlighter; }); setCommentStyle(Utils::CommentDefinition::HashStyle); + setParenthesesMatchingEnabled(true); + setMarksVisible(true); + setCodeFoldingSupported(true); } } // namespace Internal -- cgit v1.2.1