David Faure - 2013-12-21

I wrote a patch for astyle that makes it work with the Qt control headers (forever, Q_FOREVER, foreach, Q_FOREACH). Not just to fix the wrong space after the keyword, but also everything inside the parenthesis, leading to things like:
Q_FOREACH(const QString & it, l) // note the space after the '&'.
when running astyle with -n -Q --indent=spaces=4 --style=otbs \ --indent-labels --pad-oper --unpad-paren --pad-header \ --keep-one-line-statements --convert-tabs \ --indent-preprocessor --align-pointer=name

The patch is here: http://www.davidfaure.fr/kde/astyle_qt.diff

I would be happy to see it merged into upstream astyle.
But I can also understand a reply like "this is Qt specific" ... it is.
Maybe we could have a command-line argument with the list of "headers" to support, then?