aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/glsleditor/glslindenter.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-07-26 13:31:30 +0200
committerhjk <hjk@qt.io>2023-07-26 13:35:28 +0000
commit75d9dc2d313acca3ddf72809d2d2bec89b836844 (patch)
treeca3c198abee0013fa3fb3346e67491959aa021fe /src/plugins/glsleditor/glslindenter.cpp
parenta140a930675dd3b7af5fbbc423dc2aa444512881 (diff)
CppEditor: Apply 'static pattern' to CppToolsSettings
Change-Id: I1632787e1a1ebf60427c92b302b25a1a2550853f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/glsleditor/glslindenter.cpp')
-rw-r--r--src/plugins/glsleditor/glslindenter.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/glsleditor/glslindenter.cpp b/src/plugins/glsleditor/glslindenter.cpp
index c914dbc36c..7a8dcbbb28 100644
--- a/src/plugins/glsleditor/glslindenter.cpp
+++ b/src/plugins/glsleditor/glslindenter.cpp
@@ -34,8 +34,7 @@ void GlslIndenter::indentBlock(const QTextBlock &block,
{
// TODO: do something with it
CppEditor::QtStyleCodeFormatter
- codeFormatter(tabSettings,
- CppEditor::CppToolsSettings::instance()->cppCodeStyle()->codeStyleSettings());
+ codeFormatter(tabSettings, CppEditor::CppToolsSettings::cppCodeStyle()->codeStyleSettings());
codeFormatter.updateStateUntil(block);
int indent;
@@ -66,8 +65,7 @@ void GlslIndenter::indent(const QTextCursor &cursor,
// TODO: do something with it
CppEditor::QtStyleCodeFormatter codeFormatter(tabSettings,
- CppEditor::CppToolsSettings::instance()
- ->cppCodeStyle()
+ CppEditor::CppToolsSettings::cppCodeStyle()
->codeStyleSettings());
codeFormatter.updateStateUntil(block);
@@ -92,8 +90,7 @@ int GlslIndenter::indentFor(const QTextBlock &block,
int /*cursorPositionInEditor*/)
{
CppEditor::QtStyleCodeFormatter
- codeFormatter(tabSettings,
- CppEditor::CppToolsSettings::instance()->cppCodeStyle()->codeStyleSettings());
+ codeFormatter(tabSettings, CppEditor::CppToolsSettings::cppCodeStyle()->codeStyleSettings());
codeFormatter.updateStateUntil(block);
int indent;
@@ -109,8 +106,7 @@ TextEditor::IndentationForBlock GlslIndenter::indentationForBlocks(
int /*cursorPositionInEditor*/)
{
CppEditor::QtStyleCodeFormatter
- codeFormatter(tabSettings,
- CppEditor::CppToolsSettings::instance()->cppCodeStyle()->codeStyleSettings());
+ codeFormatter(tabSettings, CppEditor::CppToolsSettings::cppCodeStyle()->codeStyleSettings());
codeFormatter.updateStateUntil(blocks.last());