From d7058e1afedfe609ff6e81222bd2137922bf7de3 Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Wed, 16 Jan 2019 09:37:54 +0100 Subject: 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 --- src/plugins/pythoneditor/pythoneditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/pythoneditor/pythoneditor.cpp') 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); -- cgit v1.2.1