diff options
author | David Schulz <david.schulz@theqtcompany.com> | 2016-01-13 14:32:23 +0100 |
---|---|---|
committer | David Schulz <david.schulz@theqtcompany.com> | 2016-02-24 12:03:12 +0000 |
commit | 9aa51d4857702c22d359014356d06c9d92677904 (patch) | |
tree | 79d73774ac0541e65fbe03e44592a43fc95ba152 /src/plugins/glsleditor/glslindenter.cpp | |
parent | bc921b46a2946294b467e1d2bcafb147ee77361a (diff) |
Editor: Fix whitespace cleaning.
Task-number: QTCREATORBUG-7994
Change-Id: I6c197ccc3a148555018e8f8184d116c88d7ea400
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/glsleditor/glslindenter.cpp')
-rw-r--r-- | src/plugins/glsleditor/glslindenter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/glsleditor/glslindenter.cpp b/src/plugins/glsleditor/glslindenter.cpp index fd4698ac6c..33aa847064 100644 --- a/src/plugins/glsleditor/glslindenter.cpp +++ b/src/plugins/glsleditor/glslindenter.cpp @@ -111,5 +111,18 @@ void GlslIndenter::indent(QTextDocument *doc, } } +int GlslIndenter::indentFor(const QTextBlock &block, const TextEditor::TabSettings &tabSettings) +{ + CppTools::QtStyleCodeFormatter codeFormatter(tabSettings, + CppTools::CppToolsSettings::instance()->cppCodeStyle()->codeStyleSettings()); + + codeFormatter.updateStateUntil(block); + int indent; + int padding; + codeFormatter.indentFor(block, &indent, &padding); + + return indent; +} + } // namespace Internal } // namespace GlslEditor |