aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/glsleditor/glslindenter.cpp
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-08-21 08:29:55 +0200
committerhjk <hjk121@nokiamail.com>2014-08-21 12:30:15 +0200
commitbb8575c60c89f84b0d7cb76cb8afff48e32c9027 (patch)
tree0e4ac81137d4b3b995fd5d7d6755d7f6e6f961e8 /src/plugins/glsleditor/glslindenter.cpp
parent2481e71d1885561ff9af7091e88d9eb821dac008 (diff)
GlslEditor: Code cosmetics
Namespaces, CamelCase names. Change-Id: I6ced0dccb073bda0fc82fed1831886fb9f62bf65 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'src/plugins/glsleditor/glslindenter.cpp')
-rw-r--r--src/plugins/glsleditor/glslindenter.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/plugins/glsleditor/glslindenter.cpp b/src/plugins/glsleditor/glslindenter.cpp
index e8c80bd624..a14cd6e3f1 100644
--- a/src/plugins/glsleditor/glslindenter.cpp
+++ b/src/plugins/glsleditor/glslindenter.cpp
@@ -39,27 +39,24 @@
#include <QTextBlock>
#include <QTextCursor>
-using namespace GLSLEditor;
-using namespace Internal;
+namespace GLSLEditor {
+namespace Internal {
-GLSLIndenter::GLSLIndenter()
+GlslIndenter::GlslIndenter()
{}
-GLSLIndenter::~GLSLIndenter()
+GlslIndenter::~GlslIndenter()
{}
-bool GLSLIndenter::isElectricCharacter(const QChar &ch) const
+bool GlslIndenter::isElectricCharacter(const QChar &ch) const
{
- if (ch == QLatin1Char('{') ||
- ch == QLatin1Char('}') ||
- ch == QLatin1Char(':') ||
- ch == QLatin1Char('#')) {
- return true;
- }
- return false;
+ return ch == QLatin1Char('{')
+ || ch == QLatin1Char('}')
+ || ch == QLatin1Char(':')
+ || ch == QLatin1Char('#');
}
-void GLSLIndenter::indentBlock(QTextDocument *doc,
+void GlslIndenter::indentBlock(QTextDocument *doc,
const QTextBlock &block,
const QChar &typedChar,
const TextEditor::TabSettings &tabSettings)
@@ -75,8 +72,8 @@ void GLSLIndenter::indentBlock(QTextDocument *doc,
int padding;
codeFormatter.indentFor(block, &indent, &padding);
- // only reindent the current line when typing electric characters if the
- // indent is the same it would be if the line were empty
+ // Only reindent the current line when typing electric characters if the
+ // indent is the same it would be if the line were empty.
if (isElectricCharacter(typedChar)) {
int newlineIndent;
int newlinePadding;
@@ -88,7 +85,7 @@ void GLSLIndenter::indentBlock(QTextDocument *doc,
tabSettings.indentLine(block, indent + padding, padding);
}
-void GLSLIndenter::indent(QTextDocument *doc,
+void GlslIndenter::indent(QTextDocument *doc,
const QTextCursor &cursor,
const QChar &typedChar,
const TextEditor::TabSettings &tabSettings)
@@ -117,3 +114,6 @@ void GLSLIndenter::indent(QTextDocument *doc,
indentBlock(doc, cursor.block(), typedChar, tabSettings);
}
}
+
+} // namespace Internal
+} // namespace GLSLEditor