Fixing some Qt4-Qt5 transition issues