From 40df729a88744494afbd7356f74334eb9de6c80d Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 29 Jul 2025 17:19:34 +0200 Subject: [PATCH] Fix addresses list from phone. Fix crash with MSQOGL and destroiying QML object that is still link with other objects. --- Linphone/core/friend/FriendCore.cpp | 5 +++-- Linphone/view/Page/Layout/Main/MainLayout.qml | 8 +++++++- external/linphone-sdk | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Linphone/core/friend/FriendCore.cpp b/Linphone/core/friend/FriendCore.cpp index 1b3e2e13d..7bac95f68 100644 --- a/Linphone/core/friend/FriendCore.cpp +++ b/Linphone/core/friend/FriendCore.cpp @@ -445,8 +445,9 @@ QList FriendCore::getAllAddresses() const { auto phoneNumbers = mPhoneNumberList; while (addressIt != mAddressList.end()) { auto username = Utils::getUsername(addressIt->toMap()["address"].toString()); - std::remove_if(phoneNumbers.begin(), phoneNumbers.end(), - [username](const QVariant &data) { return data.toMap()["address"].toString() == username; }); + phoneNumbers.erase(std::remove_if(phoneNumbers.begin(), phoneNumbers.end(), + [username](const QVariant &data) { return data.toMap()["address"].toString() == username; }) + , phoneNumbers.end()); ++addressIt; } addresses << phoneNumbers; diff --git a/Linphone/view/Page/Layout/Main/MainLayout.qml b/Linphone/view/Page/Layout/Main/MainLayout.qml index 9b581a28b..e423f2157 100644 --- a/Linphone/view/Page/Layout/Main/MainLayout.qml +++ b/Linphone/view/Page/Layout/Main/MainLayout.qml @@ -99,10 +99,16 @@ Item { x: mainItem.width / 2 - width / 2 y: contentItem.height / 2 property var currentCall: callsModel.currentCall ? callsModel.currentCall : null + property var conference: currentCall ? currentCall.core.conference : null property string remoteName: currentCall ? currentCall.core.remoteName : "" + property string subject: conference ? conference.core.subject : '' contentItem: MediumButton { style: ButtonStyle.toast - text: currentCallNotif.currentCall ? currentCallNotif.currentCall.core.conference ? ("Réunion en cours : ") + currentCallNotif.currentCall.core.conference.core.subject : (("Appel en cours : ") + currentCallNotif.remoteName) : "appel en cours" + text: currentCallNotif.currentCall + ? currentCallNotif.conference + ? ("Réunion en cours : ") + currentCallNotif.subject + : (("Appel en cours : ") + currentCallNotif.remoteName) + : "appel en cours" onClicked: { var callsWindow = UtilsCpp.getCallsWindow( currentCallNotif.currentCall) diff --git a/external/linphone-sdk b/external/linphone-sdk index 2f9c2d231..8d4192c62 160000 --- a/external/linphone-sdk +++ b/external/linphone-sdk @@ -1 +1 @@ -Subproject commit 2f9c2d231386233c1d93a6120a109e5fdd5eb50a +Subproject commit 8d4192c62c6b119cd8b8120b3407bfe8d7cce96c