summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor/pythoneditor.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-08-03 00:07:44 +0200
committerhjk <hjk@qt.io>2016-08-26 08:20:22 +0000
commit56a098598f04133ee51d7599c57f4da83e3460ef (patch)
treef0e3769dab4587a71dceda12678f158cef526a56 /src/plugins/pythoneditor/pythoneditor.cpp
parentedb0da7552055ca50bdc0ea4441e253dcb2fd007 (diff)
downloadqt-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.cpp12
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);