fix(ContactModel): destroy correctly vcard

This commit is contained in:
Ronan Abhamon 2018-10-22 15:30:47 +02:00 committed by Ronan
parent 3948f67c07
commit 35efad0213

View file

@ -95,6 +95,7 @@ void ContactModel::setVcardModelInternal (VcardModel *vcardModel) {
mVcardModel->mIsReadOnly = true;
App::getInstance()->getEngine()->setObjectOwnership(mVcardModel, QQmlEngine::CppOwnership);
mVcardModel->setParent(this);
if (mLinphoneFriend->getVcard() != vcardModel->mVcard)
mLinphoneFriend->setVcard(vcardModel->mVcard);