some fixes for both qt5 and qt4 building;