Qt5 compatibility fixes