diff --git a/src/plugins/cpptools/cppqtstyleindenter.cpp b/src/plugins/cpptools/cppqtstyleindenter.cpp index 4b134127c4e..4858d540fc9 100644 --- a/src/plugins/cpptools/cppqtstyleindenter.cpp +++ b/src/plugins/cpptools/cppqtstyleindenter.cpp @@ -61,6 +61,7 @@ bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const case '#': case '<': case '>': + case ';': return true; } return false; @@ -69,6 +70,8 @@ bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const static bool isElectricInLine(const QChar ch, const QString &text) { switch (ch.toLatin1()) { + case ';': + return text.contains(QLatin1String("break")); case ':': // switch cases and access declarations should be reindented if (text.contains(QLatin1String("case"))