Adapt addresses API changes on const + wrapper.

This commit is contained in:
Julien Wadel 2023-04-13 18:59:10 +02:00
parent de9f2fe6cb
commit c07eaa23ec
5 changed files with 9 additions and 9 deletions

View file

@ -205,7 +205,7 @@ void ParticipantListModel::add(const std::shared_ptr<const linphone::Participant
}
void ParticipantListModel::add(const std::shared_ptr<const linphone::Address> & participantAddress){
add((mChatRoomModel ? mChatRoomModel->getChatRoom()->findParticipant(participantAddress) : mConferenceModel->getConference()->findParticipant(participantAddress)));
add((mChatRoomModel ? mChatRoomModel->getChatRoom()->findParticipant(participantAddress->clone()) : mConferenceModel->getConference()->findParticipant(participantAddress)));
}
void ParticipantListModel::remove (ParticipantModel *model) {

View file

@ -79,13 +79,13 @@ AccountSettingsModel::AccountSettingsModel (QObject *parent) : QObject(parent) {
// -----------------------------------------------------------------------------
shared_ptr<const linphone::Address> AccountSettingsModel::getUsedSipAddress () const {
shared_ptr<linphone::Address> AccountSettingsModel::getUsedSipAddress () const {
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
shared_ptr<linphone::Account> account = core->getDefaultAccount();
return account ? account->getParams()->getIdentityAddress() : core->createPrimaryContactParsed();
return account ? account->getParams()->getIdentityAddress()->clone() : core->createPrimaryContactParsed();
}
void AccountSettingsModel::setUsedSipAddress (const shared_ptr<const linphone::Address> &address) {
void AccountSettingsModel::setUsedSipAddress (const shared_ptr<linphone::Address> &address) {
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
shared_ptr<linphone::Account> account = core->getDefaultAccount();
if( account){

View file

@ -63,8 +63,8 @@ public:
AccountSettingsModel (QObject *parent = Q_NULLPTR);
std::shared_ptr<const linphone::Address> getUsedSipAddress () const;
void setUsedSipAddress (const std::shared_ptr<const linphone::Address> &address);
std::shared_ptr<linphone::Address> getUsedSipAddress () const;
void setUsedSipAddress (const std::shared_ptr<linphone::Address> &address);
QString getUsedSipAddressAsStringUriOnly () const;
QString getUsedSipAddressAsString () const;

View file

@ -513,8 +513,8 @@ void SipAddressesModel::addOrUpdateSipAddress (SipAddressEntry &sipAddressEntry,
shared_ptr<linphone::ChatRoom> chatRoom(message->getChatRoom());
auto settingsModel = CoreManager::getInstance()->getSettingsModel();
int count = 0;
if (chatRoom->getCurrentParams()->getEncryptionBackend() == linphone::ChatRoomEncryptionBackend::None && !settingsModel->getStandardChatEnabled()
|| chatRoom->getCurrentParams()->getEncryptionBackend() != linphone::ChatRoomEncryptionBackend::None && !settingsModel->getSecureChatEnabled())
if (chatRoom->getCurrentParams()->getEncryptionBackend() == linphone::ChatRoom::EncryptionBackend::None && !settingsModel->getStandardChatEnabled()
|| chatRoom->getCurrentParams()->getEncryptionBackend() != linphone::ChatRoom::EncryptionBackend::None && !settingsModel->getSecureChatEnabled())
count = chatRoom->getUnreadMessagesCount();
QString localAddress(Utils::cleanSipAddress(Utils::coreStringToAppString(chatRoom->getLocalAddress()->asStringUriOnly())));

@ -1 +1 @@
Subproject commit 5e9455e658e51bd3e23d07479ac27f9144b06075
Subproject commit d3830b087972953e72961a11ce90d2e0cf3e272c