QmlJS indenter: Move reusable code to qmljs lib.

Change-Id: I5ab50b586109a9736cda48245807571ce10dfb5b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-17 13:56:48 +02:00
parent 6f613bc2f1
commit 4a487b1add
9 changed files with 348 additions and 337 deletions

View File

@@ -315,6 +315,21 @@ private:
int m_tabSize;
};
class QMLJS_EXPORT QtStyleCodeFormatter : public CodeFormatter
{
public:
QtStyleCodeFormatter();
void setIndentSize(int size);
protected:
virtual void onEnter(int newState, int *indentDepth, int *savedIndentDepth) const;
virtual void adjustIndent(const QList<QmlJS::Token> &tokens, int lexerState, int *indentDepth) const;
private:
int m_indentSize;
};
} // namespace QmlJS
#endif // QMLJSCODEFORMATTER_H