Buildfix for Qt. Gets Qt compiling again but not working yet. Hasn't compiled in a days now so I thought this was worthwhile.
Merge pull request #1149 from xsacha/master

Buildfix for Qt