fix compilation and warnings when compiling against qt5