name.isEmpty() would be more Qt style :).