Fix warnings due to qt4 to qt5 changes.