Make use of qRegisterAnonymousType where possible


Conincidentally the patch fixes a few other minor deprecation warnings
in the same file too.

Change-Id: Iaf6221cd35cca95415b7d5383477b8c2bcfe92b0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commit7711e7bcfae2c09688ecdaf587d580077889cce3
parent05659943df25a4ab6edcbfc8ebaa6bc23a2eb72f
authorAlex Blasche <alexander.blasche@qt.io>
committerAlex Blasche <alexander.blasche@qt.io>
commit timeThu, 2 Apr 2020 16:46:27 +0200