summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcodestylepreferencesfactory.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/cpptools/cppcodestylepreferencesfactory.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/cpptools/cppcodestylepreferencesfactory.cpp')
-rw-r--r--src/plugins/cpptools/cppcodestylepreferencesfactory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp b/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp
index 00da046edc..4c0ca8d9a5 100644
--- a/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp
+++ b/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp
@@ -111,9 +111,9 @@ QWidget *CppCodeStylePreferencesFactory::createEditor(TextEditor::ICodeStylePref
return widget;
}
-TextEditor::Indenter *CppCodeStylePreferencesFactory::createIndenter() const
+TextEditor::Indenter *CppCodeStylePreferencesFactory::createIndenter(QTextDocument *doc) const
{
- return new CppQtStyleIndenter();
+ return new CppQtStyleIndenter(doc);
}
QString CppCodeStylePreferencesFactory::snippetProviderGroupId() const