aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/glsleditor/glslindenter.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-02-03 15:48:14 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2011-05-24 12:45:07 +0200
commit779fafcbfe6f92dd1288664fae512f69bc12418b (patch)
tree38a3b75cc3a18f386ab72102e97f06ffa24d4d29 /src/plugins/glsleditor/glslindenter.cpp
parentf69eb52944a7fc8306cbb72b7325a610045dea7a (diff)
Make C++ code style configurable.
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b Done-with: Jarek Kobus Task-number: QTCREATORBUG-2670 Task-number: QTCREATORBUG-4310 Task-number: QTCREATORBUG-2763 Task-number: QTCREATORBUG-3623 Task-number: QTCREATORBUG-567 Reviewed-on: http://codereview.qt.nokia.com/74 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/plugins/glsleditor/glslindenter.cpp')
-rw-r--r--src/plugins/glsleditor/glslindenter.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/glsleditor/glslindenter.cpp b/src/plugins/glsleditor/glslindenter.cpp
index a466dbac81..1180764c17 100644
--- a/src/plugins/glsleditor/glslindenter.cpp
+++ b/src/plugins/glsleditor/glslindenter.cpp
@@ -33,6 +33,8 @@
#include "glslindenter.h"
#include <cpptools/cppcodeformatter.h>
+#include <cpptools/cpptoolssettings.h>
+#include <cpptools/cppcodestylepreferences.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/tabsettings.h>
@@ -69,7 +71,9 @@ void GLSLIndenter::indentBlock(QTextDocument *doc,
Q_UNUSED(doc)
const TextEditor::TabSettings &ts = editor->tabSettings();
- CppTools::QtStyleCodeFormatter codeFormatter(ts);
+ // TODO: do something with it
+ CppTools::QtStyleCodeFormatter codeFormatter(ts,
+ CppTools::CppToolsSettings::instance()->cppCodeStylePreferences()->settings());
codeFormatter.updateStateUntil(block);
int indent;
@@ -99,7 +103,9 @@ void GLSLIndenter::indent(QTextDocument *doc,
const QTextBlock end = doc->findBlock(cursor.selectionEnd()).next();
const TextEditor::TabSettings &ts = editor->tabSettings();
- CppTools::QtStyleCodeFormatter codeFormatter(ts);
+ // TODO: do something with it
+ CppTools::QtStyleCodeFormatter codeFormatter(ts,
+ CppTools::CppToolsSettings::instance()->cppCodeStylePreferences()->settings());
codeFormatter.updateStateUntil(block);
QTextCursor tc = editor->textCursor();