Please keep the original way of indenting `case` inside `switch`, which is to have them on the same level. Qt Creator normally does that by default, are you using a different editor? Also missing space after `if`.