Fix issues in qobjectclass.cpp template file

Change-Id: I6e17e46b94f8e5769ef266bf7960c70bfd97c8cf
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>