diff options
author | hjk <hjk@theqtcompany.com> | 2016-08-03 00:07:44 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2016-08-26 08:20:22 +0000 |
commit | 56a098598f04133ee51d7599c57f4da83e3460ef (patch) | |
tree | f0e3769dab4587a71dceda12678f158cef526a56 /src/plugins/pythoneditor/pythoneditor.cpp | |
parent | edb0da7552055ca50bdc0ea4441e253dcb2fd007 (diff) | |
download | qt-creator-56a098598f04133ee51d7599c57f4da83e3460ef.tar.gz |
PythonEditor: Modernize/Streamline
Remove virtual, add override, add = delete, remove QLatin1*,
flatten filesystem hierarchy, remove unneeded 'inline',
use initializer list, etc.
Change-Id: I0a95d806d73ca1a33cfd1ba85c2664d9ebc32690
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditor.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/pythoneditor/pythoneditor.cpp b/src/plugins/pythoneditor/pythoneditor.cpp index 17e75880d8..20acd63918 100644 --- a/src/plugins/pythoneditor/pythoneditor.cpp +++ b/src/plugins/pythoneditor/pythoneditor.cpp @@ -26,8 +26,8 @@ #include "pythoneditor.h" #include "pythoneditorconstants.h" #include "pythoneditorplugin.h" -#include "tools/pythonindenter.h" -#include "tools/pythonhighlighter.h" +#include "pythonindenter.h" +#include "pythonhighlighter.h" #include <texteditor/texteditoractionhandler.h> #include <texteditor/texteditorconstants.h> @@ -44,15 +44,15 @@ PythonEditorFactory::PythonEditorFactory() { setId(Constants::C_PYTHONEDITOR_ID); setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::C_EDITOR_DISPLAY_NAME)); - addMimeType(QLatin1String(Constants::C_PY_MIMETYPE)); + addMimeType(Constants::C_PY_MIMETYPE); setEditorActionHandlers(TextEditorActionHandler::Format | TextEditorActionHandler::UnCommentSelection | TextEditorActionHandler::UnCollapseAll); - setDocumentCreator([]() { return new TextDocument(Constants::C_PYTHONEDITOR_ID); }); - setIndenterCreator([]() { return new PythonIndenter; }); - setSyntaxHighlighterCreator([]() { return new PythonHighlighter; }); + setDocumentCreator([] { return new TextDocument(Constants::C_PYTHONEDITOR_ID); }); + setIndenterCreator([] { return new PythonIndenter; }); + setSyntaxHighlighterCreator([] { return new PythonHighlighter; }); setCommentStyle(Utils::CommentDefinition::HashStyle); setParenthesesMatchingEnabled(true); setMarksVisible(true); |