qtviewer stuff and fix minor warnings