mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
fix(src/components/contact/ContactModel): chain vcardUpdated signal to contactUpdated
This commit is contained in:
parent
e61c6cd893
commit
23f0c85483
3 changed files with 8 additions and 1 deletions
|
|
@ -11,11 +11,12 @@ using namespace std;
|
|||
const char *ContactModel::NAME = "contact-model";
|
||||
|
||||
ContactModel::ContactModel (shared_ptr<linphone::Friend> linphone_friend) {
|
||||
linphone_friend->setData(NAME, *this);
|
||||
m_linphone_friend = linphone_friend;
|
||||
m_linphone_friend->setData(NAME, *this);
|
||||
m_vcard = make_shared<VcardModel>(linphone_friend->getVcard());
|
||||
|
||||
App::getInstance()->getEngine()->setObjectOwnership(m_vcard.get(), QQmlEngine::CppOwnership);
|
||||
QObject::connect(m_vcard.get(), &VcardModel::vcardUpdated, this, &ContactModel::contactUpdated);
|
||||
}
|
||||
|
||||
ContactModel::ContactModel (VcardModel *vcard) {
|
||||
|
|
@ -28,6 +29,7 @@ ContactModel::ContactModel (VcardModel *vcard) {
|
|||
m_vcard.reset(vcard);
|
||||
|
||||
engine->setObjectOwnership(vcard, QQmlEngine::CppOwnership);
|
||||
QObject::connect(vcard, &VcardModel::vcardUpdated, this, &ContactModel::contactUpdated);
|
||||
}
|
||||
|
||||
Presence::PresenceStatus ContactModel::getPresenceStatus () const {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class ContactModel : public QObject {
|
|||
public:
|
||||
ContactModel (std::shared_ptr<linphone::Friend> linphone_friend);
|
||||
ContactModel (VcardModel *vcard);
|
||||
~ContactModel () = default;
|
||||
|
||||
static const char *NAME;
|
||||
|
||||
|
|
|
|||
|
|
@ -323,6 +323,10 @@ ColumnLayout {
|
|||
color: ContactEditStyle.values.separator.color
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Edition buttons.
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
Row {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: ContactEditStyle.buttons.topMargin
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue