qt minor refactor