summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor/pythoneditor.cpp
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2019-01-16 09:37:54 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2019-01-22 09:52:15 +0000
commitd7058e1afedfe609ff6e81222bd2137922bf7de3 (patch)
tree62d16136c8336646b8ef0ad4d220b7e0e8331203 /src/plugins/pythoneditor/pythoneditor.cpp
parent8b5beeb952448540a3834333b694919563d81ee2 (diff)
downloadqt-creator-d7058e1afedfe609ff6e81222bd2137922bf7de3.tar.gz
ClangFormat: Refactor indenter to allow ClangFormat unit-tests
We do not build texteditor files in unit-tests so some tricks were required to make ClangFormatIndenter available. First simple unit-test proofs it builds and runs. Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditor.cpp')
-rw-r--r--src/plugins/pythoneditor/pythoneditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/pythoneditor/pythoneditor.cpp b/src/plugins/pythoneditor/pythoneditor.cpp
index 4c8b95ad92..d0f27ae63c 100644
--- a/src/plugins/pythoneditor/pythoneditor.cpp
+++ b/src/plugins/pythoneditor/pythoneditor.cpp
@@ -54,7 +54,7 @@ PythonEditorFactory::PythonEditorFactory()
| TextEditorActionHandler::FollowSymbolUnderCursor);
setDocumentCreator([] { return new TextDocument(Constants::C_PYTHONEDITOR_ID); });
- setIndenterCreator([] { return new PythonIndenter; });
+ setIndenterCreator([](QTextDocument *doc) { return new PythonIndenter(doc); });
setSyntaxHighlighterCreator([] { return new PythonHighlighter; });
setCommentDefinition(Utils::CommentDefinition::HashStyle);
setParenthesesMatchingEnabled(true);