diff options
Diffstat (limited to 'src/plugins/cpptools/cppqtstyleindenter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppqtstyleindenter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/cpptools/cppqtstyleindenter.cpp b/src/plugins/cpptools/cppqtstyleindenter.cpp index f687a21618..ebb845390f 100644 --- a/src/plugins/cpptools/cppqtstyleindenter.cpp +++ b/src/plugins/cpptools/cppqtstyleindenter.cpp @@ -53,10 +53,11 @@ CppQtStyleIndenter::~CppQtStyleIndenter() bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const { - if (ch == QLatin1Char('{') || - ch == QLatin1Char('}') || - ch == QLatin1Char(':') || - ch == QLatin1Char('#')) { + switch (ch.toLatin1()) { + case '{': + case '}': + case ':': + case '#': return true; } return false; |