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/texteditor/icodestylepreferencesfactory.h | |
parent | 8b5beeb952448540a3834333b694919563d81ee2 (diff) |
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/texteditor/icodestylepreferencesfactory.h')
-rw-r--r-- | src/plugins/texteditor/icodestylepreferencesfactory.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/texteditor/icodestylepreferencesfactory.h b/src/plugins/texteditor/icodestylepreferencesfactory.h index 43cc6edffd..2acc0a5fa4 100644 --- a/src/plugins/texteditor/icodestylepreferencesfactory.h +++ b/src/plugins/texteditor/icodestylepreferencesfactory.h @@ -27,13 +27,14 @@ #include "texteditor_global.h" +#include "indenter.h" + #include <QObject> namespace Core { class Id; } namespace TextEditor { class ICodeStylePreferences; -class Indenter; class SnippetProvider; class TEXTEDITOR_EXPORT ICodeStylePreferencesFactory : public QObject @@ -48,7 +49,7 @@ public: virtual QString displayName() = 0; virtual ICodeStylePreferences *createCodeStyle() const = 0; virtual QWidget *createEditor(ICodeStylePreferences *preferences, QWidget *parent) const = 0; - virtual TextEditor::Indenter *createIndenter() const = 0; + virtual TextEditor::Indenter *createIndenter(QTextDocument *doc) const = 0; virtual QString snippetProviderGroupId() const = 0; virtual QString previewText() const = 0; }; |