Qt5/Qt4 compatibility fix, v2