fixes to compile under qt5 (still some drawing errors)