Qt: Clean up messy code.