Fix some compile warnings


Mostly unsafe type conversions, and replacing deprecated APIs.

Still can't remove the not-clean-build flags because of bug in qtbase.

Pick-to: 6.3
Change-Id: I1e305be2cdf52ccd62949c023c999be347810dd5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
commit5729b957a9db727345d6b5f3493791f05f922a88
parent9865623145760b015c85209c540259071a173a4e
authorMike Krus <mike.krus@kdab.com>
committerMike Krus <mike.krus@kdab.com>
commit timeFri, 3 Jun 2022 16:58:46 +0000