ClassView: Simplify code

Change-Id: I7b69ff062222c44ac11c4961c3a221917df73df2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>