fix most compiler warnings

builds with qt 4.8 and qt 5.2 on a mac