Make tests compile with the QExplicitlySharedDataPointer's static_cast

We also need the static_casts there.

Change-Id: I5e04109d2465e079909138152324820e931062cd
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>