QT5 Compatibility Update and other fixes

This is an update for most of the known changes in QT5.
Feel free to review and merge
cheers,
layer1gfx