diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-01-16 09:37:54 +0100 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-01-22 09:52:15 +0000 |
commit | d7058e1afedfe609ff6e81222bd2137922bf7de3 (patch) | |
tree | 62d16136c8336646b8ef0ad4d220b7e0e8331203 /src/plugins/qmljstools/qmljsrefactoringchanges.cpp | |
parent | 8b5beeb952448540a3834333b694919563d81ee2 (diff) | |
download | qt-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/qmljstools/qmljsrefactoringchanges.cpp')
-rw-r--r-- | src/plugins/qmljstools/qmljsrefactoringchanges.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmljstools/qmljsrefactoringchanges.cpp b/src/plugins/qmljstools/qmljsrefactoringchanges.cpp index b27631c2d0..3fda024e4e 100644 --- a/src/plugins/qmljstools/qmljsrefactoringchanges.cpp +++ b/src/plugins/qmljstools/qmljsrefactoringchanges.cpp @@ -77,8 +77,8 @@ public: const TextEditor::TabSettings &tabSettings = ProjectExplorer::actualTabSettings(fileName, textDocument); - QmlJSEditor::Internal::Indenter indenter; - indenter.reindent(selection.document(), selection, tabSettings); + QmlJSEditor::Internal::Indenter indenter(selection.document()); + indenter.reindent(selection, tabSettings); } void fileChanged(const QString &fileName) override |