diff --git a/src/plugins/cpptools/cppqtstyleindenter.cpp b/src/plugins/cpptools/cppqtstyleindenter.cpp index 4b134127c4edc291ec9c0e6f0f390b1a6b12f343..4858d540fc999bedb0462dfed33d169916d029fb 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"))