[qt] format, remove dead code, need other ways to handle cleanup