Replace use of C-style cast with something that is not a cast.

Avoids a warning in user code. We should add -Wold-style-cast to our
header checks.

Task-number: QTBUG-32735
Change-Id: Ic284e3a5df56789d51484364b34a9ebc026bb20a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I29e25aef95a7b845bfe7d57d41369fec2f1fd562