This is just a short one.
What would you say if I told you that you can have an indent-like command that actually understands your code?
And that it has plugins for vim, emacs and a few other editors/IDEs that will allow you to reformat your code on the fly?
If you would say ‘Yes please!’, just visit this page and enjoy: Clang Format.
It works quite nicely, except that it doesn’t really speak Qt. Qt’s macro-keywords like Q_SIGNALS, foreach and similar will still require your manual formatting.