Fix unit test related to QVariant.