Does enclosing the definition in parenthesis make any difference?
I'm asking because the Qt moc compiler crashes when it sees the latter variant enclosed in parenthesis and WINDOWS is defined.
Update: Upgraded from Qt 5.4.2 to Qt 5.6 and I no longer see the problem.