Replace Q_WS_WIN with appropriate guards to account for Qt5.

This commit replaces almost all occurrences of Q_WS_WIN to comply
with Qt5. The remaining occurrences should *not* be replaced,
because the guarded code won't compile on Qt5.
Merge remote-tracking branch 'github/build-bot-master' into bleeding-edge-master
2014.08.25-18.00