Fix Qt5 compatibility