diff options
author | hjk <hjk121@nokiamail.com> | 2014-10-15 00:36:39 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-10-15 12:35:41 +0200 |
commit | eacaf93a594e8f4491bf69e7b95a8ffada66034f (patch) | |
tree | e5d527cd99cde76f652f773052e1ee8c2069e5b8 /src/plugins/pythoneditor/pythoneditor.cpp | |
parent | 9ee73a4fac0168ab57cc7dcc3f4ceeb1d3d8b973 (diff) | |
download | qt-creator-eacaf93a594e8f4491bf69e7b95a8ffada66034f.tar.gz |
TextEditor: Factory cosmetics
Pimpl, add some convenience setters.
Change-Id: I525c080179fddab6fe2bd2270505fdbf33e56be2
Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditor.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditor.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
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 |