Fix mistake in assertion.
Remove deprecated qVariantValue call.