Adapt addresses API changes on const + wrapper.

This commit is contained in:
Julien Wadel 2023-04-13 18:59:10 +02:00
parent 426daae330
commit 81f3bdf632
4 changed files with 8 additions and 8 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())));