diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-10-17 13:56:48 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-10-19 08:33:21 +0200 |
commit | 4a487b1addb1a2be1b66c1b5ccaf3afc45b7f64c (patch) | |
tree | 1f7f79fd4f61daeee6b3d66dd64aa52992152016 /src/plugins/qmljstools/qmljsqtstylecodeformatter.h | |
parent | 6f613bc2f17cd7ea3558e1179e41a16be5fd33e0 (diff) |
QmlJS indenter: Move reusable code to qmljs lib.
Change-Id: I5ab50b586109a9736cda48245807571ce10dfb5b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Diffstat (limited to 'src/plugins/qmljstools/qmljsqtstylecodeformatter.h')
-rw-r--r-- | src/plugins/qmljstools/qmljsqtstylecodeformatter.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/plugins/qmljstools/qmljsqtstylecodeformatter.h b/src/plugins/qmljstools/qmljsqtstylecodeformatter.h index 9668c498c9..f48ec9754b 100644 --- a/src/plugins/qmljstools/qmljsqtstylecodeformatter.h +++ b/src/plugins/qmljstools/qmljsqtstylecodeformatter.h @@ -44,18 +44,13 @@ namespace TextEditor { namespace QmlJSTools { -class QMLJSTOOLS_EXPORT QtStyleCodeFormatter : public QmlJS::CodeFormatter +class QMLJSTOOLS_EXPORT CreatorCodeFormatter : public QmlJS::QtStyleCodeFormatter { public: - QtStyleCodeFormatter(); - explicit QtStyleCodeFormatter(const TextEditor::TabSettings &tabSettings); - - void setIndentSize(int size); + CreatorCodeFormatter(); + explicit CreatorCodeFormatter(const TextEditor::TabSettings &tabSettings); protected: - virtual void onEnter(int newState, int *indentDepth, int *savedIndentDepth) const; - virtual void adjustIndent(const QList<QmlJS::Token> &tokens, int lexerState, int *indentDepth) const; - virtual void saveBlockData(QTextBlock *block, const BlockData &data) const; virtual bool loadBlockData(const QTextBlock &block, BlockData *data) const; @@ -63,8 +58,6 @@ protected: virtual int loadLexerState(const QTextBlock &block) const; private: - int m_indentSize; - class QmlJSCodeFormatterData: public TextEditor::CodeFormatterData { public: |