From 598b45bbf482f8ef5cc5dadee8ac6e67852099d3 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Tue, 23 Sep 2025 16:17:34 +0200 Subject: [PATCH] prevent cloning when not necessary --- Linphone/core/account/AccountCore.cpp | 7 +- .../core/call-history/CallHistoryCore.cpp | 19 +- Linphone/core/call/CallCore.cpp | 3 +- Linphone/core/chat/ChatCore.cpp | 23 ++- .../core/chat/message/ChatMessageCore.cpp | 12 +- Linphone/core/chat/message/EventLogCore.cpp | 4 +- Linphone/core/conference/ConferenceCore.cpp | 2 +- .../core/conference/ConferenceInfoCore.cpp | 5 +- .../AbstractEventCountNotifier.cpp | 5 +- Linphone/core/notifier/Notifier.cpp | 4 +- Linphone/core/participant/ParticipantCore.cpp | 4 +- .../participant/ParticipantDeviceCore.cpp | 2 +- Linphone/data/languages/de.ts | 162 +++++++++--------- Linphone/data/languages/en.ts | 162 +++++++++--------- Linphone/data/languages/fr_FR.ts | 162 +++++++++--------- Linphone/model/account/AccountModel.cpp | 8 +- Linphone/model/chat/ChatModel.cpp | 4 +- .../model/conference/ConferenceInfoModel.cpp | 2 +- Linphone/model/core/CoreModel.cpp | 14 +- Linphone/model/friend/FriendsManager.cpp | 4 +- Linphone/model/friend/FriendsManager.hpp | 20 +-- Linphone/model/search/MagicSearchModel.cpp | 4 +- Linphone/model/tool/ToolModel.cpp | 14 +- Linphone/model/tool/ToolModel.hpp | 4 +- .../Control/Container/CreationFormLayout.qml | 3 +- Linphone/view/Page/Main/Chat/ChatPage.qml | 1 + .../view/Page/Window/Call/CallsWindow.qml | 1 + 27 files changed, 323 insertions(+), 332 deletions(-) diff --git a/Linphone/core/account/AccountCore.cpp b/Linphone/core/account/AccountCore.cpp index 705fb30a9..5c2e3e8f9 100644 --- a/Linphone/core/account/AccountCore.cpp +++ b/Linphone/core/account/AccountCore.cpp @@ -43,7 +43,7 @@ AccountCore::AccountCore(const std::shared_ptr &account) : QO auto address = account->getContactAddress(); mContactAddress = address ? Utils::coreStringToAppString(account->getContactAddress()->asStringUriOnly()) : ""; auto params = account->getParams()->clone(); - auto identityAddress = params->getIdentityAddress()->clone(); + auto identityAddress = params->getIdentityAddress(); mIdentityAddress = identityAddress ? Utils::coreStringToAppString(identityAddress->asStringUriOnly()) : ""; mPictureUri = Utils::coreStringToAppString(params->getPictureUri()); mRegistrationState = LinphoneEnums::fromLinphone(account->getState()); @@ -52,8 +52,9 @@ AccountCore::AccountCore(const std::shared_ptr &account) : QO mDisplayName = Utils::coreStringToAppString(identityAddress->getDisplayName()); if (mDisplayName.isEmpty()) { mDisplayName = ToolModel::getDisplayName(identityAddress); - identityAddress->setDisplayName(Utils::appStringToCoreString(mDisplayName)); - params->setIdentityAddress(identityAddress); + auto copyAddress = identityAddress->clone(); + copyAddress->setDisplayName(Utils::appStringToCoreString(mDisplayName)); + params->setIdentityAddress(copyAddress); account->setParams(params); } mRegisterEnabled = params->registerEnabled(); diff --git a/Linphone/core/call-history/CallHistoryCore.cpp b/Linphone/core/call-history/CallHistoryCore.cpp index 2e7f4c548..adc739e69 100644 --- a/Linphone/core/call-history/CallHistoryCore.cpp +++ b/Linphone/core/call-history/CallHistoryCore.cpp @@ -46,8 +46,7 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr &callL mustBeInLinphoneThread(getClassName()); mCallHistoryModel = std::make_shared(callLog); - auto addr = callLog->getRemoteAddress()->clone(); - addr->clean(); + auto addr = callLog->getRemoteAddress(); mStatus = LinphoneEnums::fromLinphone(callLog->getStatus()); mDate = QDateTime::fromMSecsSinceEpoch(callLog->getStartDate() * 1000); mIsOutgoing = callLog->getDir() == linphone::Call::Dir::Outgoing; @@ -129,14 +128,14 @@ void CallHistoryCore::setSelf(QSharedPointer me) { mCoreModelConnection->makeConnectToModel(&CoreModel::friendRemoved, &CallHistoryCore::onRemoved); // Update display name when display name has been requested from magic search cause not found in linphone friends // (required to get the right display name if ldap friends cleared) - mCoreModelConnection->makeConnectToModel(&CoreModel::magicSearchResultReceived, [this, remoteAddress = mRemoteAddress] { - auto displayName = ToolModel::getDisplayName(remoteAddress); - mCoreModelConnection->invokeToCore([this, displayName]() { - mDisplayName = displayName; - emit displayNameChanged(); - }); - }); - + mCoreModelConnection->makeConnectToModel(&CoreModel::magicSearchResultReceived, + [this, remoteAddress = mRemoteAddress] { + auto displayName = ToolModel::getDisplayName(remoteAddress); + mCoreModelConnection->invokeToCore([this, displayName]() { + mDisplayName = displayName; + emit displayNameChanged(); + }); + }); } ConferenceInfoGui *CallHistoryCore::getConferenceInfoGui() const { diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 6c5f08905..cb7acb750 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -115,8 +115,7 @@ CallCore::CallCore(const std::shared_ptr &call) : QObject(nullpt mRemoteVideoEnabled = videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv; mState = LinphoneEnums::fromLinphone(call->getState()); - auto remoteAddress = call->getCallLog()->getRemoteAddress()->clone(); - remoteAddress->clean(); + auto remoteAddress = call->getCallLog()->getRemoteAddress(); mRemoteAddress = Utils::coreStringToAppString(remoteAddress->asStringUriOnly()); mRemoteUsername = Utils::coreStringToAppString(remoteAddress->getUsername()); auto linphoneFriend = ToolModel::findFriendByAddress(remoteAddress); diff --git a/Linphone/core/chat/ChatCore.cpp b/Linphone/core/chat/ChatCore.cpp index 81771150a..9a6835f89 100644 --- a/Linphone/core/chat/ChatCore.cpp +++ b/Linphone/core/chat/ChatCore.cpp @@ -45,8 +45,7 @@ ChatCore::ChatCore(const std::shared_ptr &chatRoom) : QObjec mustBeInLinphoneThread(getClassName()); App::getInstance()->mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership); mLastUpdatedTime = QDateTime::fromSecsSinceEpoch(chatRoom->getLastUpdateTime()); - auto chatRoomAddress = chatRoom->getPeerAddress()->clone(); - chatRoomAddress->clean(); + auto chatRoomAddress = chatRoom->getPeerAddress(); mChatRoomAddress = Utils::coreStringToAppString(chatRoomAddress->asStringUriOnly()); if (chatRoom->hasCapability((int)linphone::ChatRoom::Capabilities::Basic)) { mTitle = ToolModel::getDisplayName(chatRoomAddress); @@ -61,8 +60,8 @@ ChatCore::ChatCore(const std::shared_ptr &chatRoom) : QObjec if (chatRoom->hasCapability((int)linphone::ChatRoom::Capabilities::OneToOne)) { if (participants.size() > 0) { auto peer = participants.front(); - if (peer) mTitle = ToolModel::getDisplayName(peer->getAddress()->clone()); - mAvatarUri = ToolModel::getDisplayName(peer->getAddress()->clone()); + if (peer) mTitle = ToolModel::getDisplayName(peer->getAddress()); + mAvatarUri = ToolModel::getDisplayName(peer->getAddress()); if (participants.size() == 1) { auto peerAddress = peer->getAddress(); if (peerAddress) mParticipantAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly()); @@ -217,8 +216,8 @@ void ChatCore::setSelf(QSharedPointer me) { auto linParticipants = chatRoom->getParticipants(); if (linParticipants.size() > 0) { auto peer = linParticipants.front(); - if (peer) title = ToolModel::getDisplayName(peer->getAddress()->clone()); - avatarUri = ToolModel::getDisplayName(peer->getAddress()->clone()); + if (peer) title = ToolModel::getDisplayName(peer->getAddress()); + avatarUri = ToolModel::getDisplayName(peer->getAddress()); if (linParticipants.size() == 1) { auto peerAddress = peer->getAddress(); if (peerAddress) @@ -319,9 +318,9 @@ void ChatCore::setSelf(QSharedPointer me) { [this](const std::shared_ptr &chatRoom, const std::shared_ptr &remoteAddress, bool isComposing) { if (mChatModel->getMonitor() != chatRoom) return; - QString name = isComposing ? ToolModel::getDisplayName(remoteAddress->clone()) : QString(); - auto remoteAddr = remoteAddress->clone(); - remoteAddr->clean(); + QString name = isComposing ? ToolModel::getDisplayName(remoteAddress) : QString(); + auto remoteAddr = remoteAddress; + // remoteAddr->clean(); mChatModelConnection->invokeToCore( [this, name, address = Utils::coreStringToAppString(remoteAddr->asStringUriOnly())]() { setComposingName(name); @@ -673,7 +672,7 @@ void ChatCore::updateInfo(const std::shared_ptr &updatedFriend } int capabilities = mChatModel->getCapabilities(); auto chatroom = mChatModel->getMonitor(); - auto chatRoomAddress = chatroom->getPeerAddress()->clone(); + auto chatRoomAddress = chatroom->getPeerAddress(); if (mChatModel->hasCapability((int)linphone::ChatRoom::Capabilities::Basic)) { mTitle = ToolModel::getDisplayName(chatRoomAddress); mAvatarUri = ToolModel::getDisplayName(chatRoomAddress); @@ -684,8 +683,8 @@ void ChatCore::updateInfo(const std::shared_ptr &updatedFriend auto participants = chatroom->getParticipants(); if (participants.size() > 0) { auto peer = participants.front(); - if (peer) mTitle = ToolModel::getDisplayName(peer->getAddress()->clone()); - mAvatarUri = ToolModel::getDisplayName(peer->getAddress()->clone()); + if (peer) mTitle = ToolModel::getDisplayName(peer->getAddress()); + mAvatarUri = ToolModel::getDisplayName(peer->getAddress()); if (participants.size() == 1) { auto peerAddress = peer->getAddress(); if (peerAddress) diff --git a/Linphone/core/chat/message/ChatMessageCore.cpp b/Linphone/core/chat/message/ChatMessageCore.cpp index 9a8375610..de475dd52 100644 --- a/Linphone/core/chat/message/ChatMessageCore.cpp +++ b/Linphone/core/chat/message/ChatMessageCore.cpp @@ -119,12 +119,12 @@ ChatMessageCore::ChatMessageCore(const std::shared_ptr &c mIsOutgoing = chatmessage->isOutgoing(); mIsRemoteMessage = !chatmessage->isOutgoing(); mPeerAddress = Utils::coreStringToAppString(chatmessage->getPeerAddress()->asStringUriOnly()); - mPeerName = ToolModel::getDisplayName(chatmessage->getPeerAddress()->clone()); - auto fromAddress = chatmessage->getFromAddress()->clone(); - fromAddress->clean(); + mPeerName = ToolModel::getDisplayName(chatmessage->getPeerAddress()); + auto fromAddress = chatmessage->getFromAddress(); + // fromAddress->clean(); mFromAddress = Utils::coreStringToAppString(fromAddress->asStringUriOnly()); - mFromName = ToolModel::getDisplayName(chatmessage->getFromAddress()->clone()); - mToName = ToolModel::getDisplayName(chatmessage->getToAddress()->clone()); + mFromName = ToolModel::getDisplayName(chatmessage->getFromAddress()); + mToName = ToolModel::getDisplayName(chatmessage->getToAddress()); auto chatroom = chatmessage->getChatRoom(); mIsFromChatGroup = chatroom->hasCapability((int)linphone::ChatRoom::Capabilities::Conference) && @@ -188,7 +188,7 @@ ChatMessageCore::ChatMessageCore(const std::shared_ptr &c auto replymessage = chatmessage->getReplyMessage(); if (replymessage) { mReplyText = ToolModel::getMessageFromContent(replymessage->getContents()); - if (mIsFromChatGroup) mRepliedToName = ToolModel::getDisplayName(replymessage->getFromAddress()->clone()); + if (mIsFromChatGroup) mRepliedToName = ToolModel::getDisplayName(replymessage->getFromAddress()); } } mImdnStatusList = computeDeliveryStatus(chatmessage); diff --git a/Linphone/core/chat/message/EventLogCore.cpp b/Linphone/core/chat/message/EventLogCore.cpp index 57fad0fd8..53faca722 100644 --- a/Linphone/core/chat/message/EventLogCore.cpp +++ b/Linphone/core/chat/message/EventLogCore.cpp @@ -100,7 +100,7 @@ void EventLogCore::computeEvent(const std::shared_ptr mImportant = false; mEphemeralRelated = false; - auto participantAddress = eventLog->getParticipantAddress() ? eventLog->getParticipantAddress()->clone() : nullptr; + auto participantAddress = eventLog->getParticipantAddress() ? eventLog->getParticipantAddress() : nullptr; switch (eventLog->getType()) { case linphone::EventLog::Type::ConferenceCreated: @@ -121,7 +121,7 @@ void EventLogCore::computeEvent(const std::shared_ptr case linphone::EventLog::Type::ConferenceSecurityEvent: { if (eventLog->getSecurityEventType() == linphone::EventLog::SecurityEventType::SecurityLevelDowngraded) { auto faultyParticipant = eventLog->getSecurityEventFaultyDeviceAddress() - ? eventLog->getSecurityEventFaultyDeviceAddress()->clone() + ? eventLog->getSecurityEventFaultyDeviceAddress() : nullptr; if (faultyParticipant) mEventDetails = tr("conference_security_event").arg(ToolModel::getDisplayName(faultyParticipant)); diff --git a/Linphone/core/conference/ConferenceCore.cpp b/Linphone/core/conference/ConferenceCore.cpp index 1b4ac28c4..9b9ddb5b0 100644 --- a/Linphone/core/conference/ConferenceCore.cpp +++ b/Linphone/core/conference/ConferenceCore.cpp @@ -48,7 +48,7 @@ ConferenceCore::ConferenceCore(const std::shared_ptr &conf mIsScreenSharingEnabled = mConferenceModel->isScreenSharingEnabled(); mIsRecording = conference->isRecording(); auto me = conference->getMe(); - auto confAddress = conference->getConferenceAddress()->clone(); + auto confAddress = conference->getConferenceAddress(); if (confAddress) { mConfUri = Utils::coreStringToAppString(confAddress->asStringUriOnly()); } diff --git a/Linphone/core/conference/ConferenceInfoCore.cpp b/Linphone/core/conference/ConferenceInfoCore.cpp index 2bd413bf2..778feec1b 100644 --- a/Linphone/core/conference/ConferenceInfoCore.cpp +++ b/Linphone/core/conference/ConferenceInfoCore.cpp @@ -188,9 +188,8 @@ void ConferenceInfoCore::setSelf(QSharedPointer me) { QString uri; if (state == linphone::ConferenceScheduler::State::Ready) { uri = mConferenceInfoModel->getConferenceScheduler()->getUri(); - emit CoreModel::getInstance() -> conferenceInfoReceived( - CoreModel::getInstance()->getCore(), - mConferenceInfoModel->getConferenceInfo()); + emit CoreModel::getInstance()->conferenceInfoReceived( + CoreModel::getInstance()->getCore(), mConferenceInfoModel->getConferenceInfo()); } mConfInfoModelConnection->invokeToCore([this, state = LinphoneEnums::fromLinphone(state), infoState = LinphoneEnums::fromLinphone(confInfoState), diff --git a/Linphone/core/event-count-notifier/AbstractEventCountNotifier.cpp b/Linphone/core/event-count-notifier/AbstractEventCountNotifier.cpp index 4e49ec036..b1143ed49 100644 --- a/Linphone/core/event-count-notifier/AbstractEventCountNotifier.cpp +++ b/Linphone/core/event-count-notifier/AbstractEventCountNotifier.cpp @@ -55,10 +55,7 @@ int AbstractEventCountNotifier::getCurrentEventCount() const { else { auto currentAccount = CoreModel::getInstance()->getCore()->getDefaultAccount(); if (currentAccount) { - auto linphoneChatRooms = currentAccount->filterChatRooms(""); - for (const auto &chatRoom : linphoneChatRooms) { - count += chatRoom->getUnreadMessagesCount(); - } + count += currentAccount->getUnreadChatMessageCount(); } return count; } diff --git a/Linphone/core/notifier/Notifier.cpp b/Linphone/core/notifier/Notifier.cpp index afb573143..5a7af61e1 100644 --- a/Linphone/core/notifier/Notifier.cpp +++ b/Linphone/core/notifier/Notifier.cpp @@ -342,8 +342,8 @@ void Notifier::notifyReceivedMessages(const std::shared_ptr auto getMessage = [this, &remoteAddress, &txt](const shared_ptr &message) { if (message->isRead()) return; - auto remoteAddr = message->getFromAddress()->clone(); - remoteAddr->clean(); + auto remoteAddr = message->getFromAddress(); + // remoteAddr->clean(); remoteAddress = Utils::coreStringToAppString(remoteAddr->asStringUriOnly()); auto fileContent = message->getFileTransferInformation(); if (!fileContent) { diff --git a/Linphone/core/participant/ParticipantCore.cpp b/Linphone/core/participant/ParticipantCore.cpp index 68fc2ca19..d6de6a3e3 100644 --- a/Linphone/core/participant/ParticipantCore.cpp +++ b/Linphone/core/participant/ParticipantCore.cpp @@ -52,8 +52,8 @@ ParticipantCore::ParticipantCore(const std::shared_ptr &p mIsMe = ToolModel::isMe(mSipAddress); mCreationTime = QDateTime::fromSecsSinceEpoch(participant->getCreationTime()); mDisplayName = Utils::coreStringToAppString(participantAddress->getDisplayName()); - if (mDisplayName.isEmpty()) mDisplayName = ToolModel::getDisplayName(participantAddress->clone()); - auto isFriend = ToolModel::findFriendByAddress(participantAddress->clone()); + if (mDisplayName.isEmpty()) mDisplayName = ToolModel::getDisplayName(participantAddress); + auto isFriend = ToolModel::findFriendByAddress(participantAddress); mSecurityLevel = isFriend ? LinphoneEnums::fromLinphone(isFriend->getSecurityLevel()) : LinphoneEnums::SecurityLevel::None; for (auto &device : participant->getDevices()) { diff --git a/Linphone/core/participant/ParticipantDeviceCore.cpp b/Linphone/core/participant/ParticipantDeviceCore.cpp index 4bbf9098a..e11dbcef1 100644 --- a/Linphone/core/participant/ParticipantDeviceCore.cpp +++ b/Linphone/core/participant/ParticipantDeviceCore.cpp @@ -44,7 +44,7 @@ ParticipantDeviceCore::ParticipantDeviceCore(const std::shared_ptrgetName()); - auto deviceAddress = device->getAddress()->clone(); + auto deviceAddress = device->getAddress(); mUniqueAddress = Utils::coreStringToAppString(deviceAddress->asString()); mAddress = Utils::coreStringToAppString(deviceAddress->asStringUriOnly()); // the display name of the device himself may be the uncleaned sip uri diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 375a3e0ae..352a8b268 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Verbunden - + drawer_menu_account_connection_status_refreshing Aktualisiere… - + drawer_menu_account_connection_status_progress Verbinde… - + drawer_menu_account_connection_status_failed Fehler - + drawer_menu_account_connection_status_cleared Deaktiviert - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." Sie sind online und erreichbar. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Verbindungsfehler, überprüfen Sie Ihre Einstellungen. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Konto deaktiviert, Sie erhalten keine Anrufe oder Nachrichten. @@ -695,76 +695,76 @@ CallCore - + call_record_end_message "Enregistrement terminé" Aufnahme beendet - + call_record_saved_in_file_message "L'appel a été enregistré dans le fichier : %1" Die Aufnahme wurde in der folgenden Datei gespeichert: %1 - - + + call_stats_codec_label "Codec: %1 / %2 kHz" Codec: %1 / %2 kHz - - + + call_stats_bandwidth_label "Bande passante : %1 %2 kbits/s %3 %4 kbits/s" Bandbreite: %1 %2 kbits/s %3 %4 kbits/s - - + + call_stats_loss_rate_label "Taux de perte: %1% %2%" Verlustquote: %1% %2% - + call_stats_jitter_buffer_label "Tampon de gigue: %1 ms" Jitter-Puffer: %1 ms - + call_stats_resolution_label "Définition vidéo : %1 %2 %3 %4" Videoauflösung: %1 %2 %3 %4 - + call_stats_fps_label "FPS : %1 %2 %3 %4" FPS : %1 %2 %3 %4 - + media_encryption_dtls DTLS - + media_encryption_none None - + media_encryption_srtp SRTP - + media_encryption_post_quantum "ZRTP - Post quantique" Post-quantum ZRTP @@ -1456,15 +1456,15 @@ %1 weiterleiten an… - - + + call_transfer_confirm_dialog_tittle "Confirmer le transfert" Weiterleitung bestätigen - - + + call_transfer_confirm_dialog_message "Vous allez transférer %1 à %2." Sie werden %1 an %2 weiterleiten. @@ -1477,7 +1477,7 @@ - + call_action_show_dialer "Pavé numérique" Wähltastatur @@ -1495,14 +1495,14 @@ Anrufliste - + Merger tous les appels call_action_merge_calls Alle Anrufe zusammenführen - + call_action_go_to_settings "Paramètres" Einstellungen @@ -1514,34 +1514,34 @@ Bildschirm teilen - + conference_share_link_title Partager le lien de la réunion Besprechungs-Link teilen - + copied Copié Kopiert - + information_popup_meeting_address_copied_to_clipboard Le lien de la réunion a été copié dans le presse-papier Der Besprechungs-Link wurde in die Zwischenablage kopiert - - - + + + conference_participants_list_title "Participants (%1)" Teilnehmer (%1) - - + + group_call_participant_selected 1 ausgewählter Teilnehmer @@ -1549,7 +1549,7 @@ - + meeting_schedule_add_participants_title Teilnehmer hinzufügen @@ -1566,132 +1566,132 @@ Statistiken - + call_action_end_call "Terminer l'appel" Anruf beenden - + call_action_resume_call "Reprendre l'appel" Anruf fortsetzen - + call_action_pause_call "Mettre l'appel en pause" Anruf pausieren - + call_action_transfer_call "Transférer l'appel" Anruf weiterleiten - + call_action_start_new_call_hint "Initier un nouvel appel" Neuen Anruf starten - + call_display_call_list_hint "Afficher la liste d'appels" Anrufliste anzeigen - + call_deactivate_video_hint "Désactiver la vidéo" "Activer la vidéo" Video deaktivieren - + call_activate_video_hint Video aktivieren - + call_activate_microphone "Activer le micro" Mikrofon aktivieren - + call_deactivate_microphone "Désactiver le micro" Mikrofon stummschalten - + call_share_screen_hint Partager l'écran… Bildschirm teilen… - + call_open_chat_hint Open chat… - + call_rise_hand_hint "Lever la main" Hand heben - + call_send_reaction_hint "Envoyer une réaction" Reaktion senden - + call_manage_participants_hint "Gérer les participants" Teilnehmer verwalten - + call_more_options_hint "Plus d'options…" Weitere Optionen… - + call_action_change_conference_layout "Modifier la disposition" Layout ändern - + call_action_full_screen "Mode Plein écran" Vollbildmodus - + call_action_stop_recording "Terminer l'enregistrement" Aufnahme beenden - + call_action_record "Enregistrer l'appel" Anruf aufnehmen - + call_activate_speaker_hint "Activer le son" Lautsprecher aktivieren - + call_deactivate_speaker_hint "Désactiver le son" Lautsprecher stummschalten @@ -1822,13 +1822,13 @@ ChatCore - + info_toast_deleted_title Deleted - + info_toast_deleted_message_history Message history has been deleted @@ -2260,31 +2260,31 @@ Error - + chat_start_group_chat_title "Nouveau groupe" - + chat_action_start_group_chat "Créer" - - + + information_popup_error_title - + group_chat_error_must_have_name "Un nom doit être donné au groupe - + group_call_error_not_connected "Vous n'etes pas connecté" Sie sind nicht verbunden @@ -2347,13 +2347,13 @@ Error ConferenceInfoCore - + information_popup_error_title "Erreur" Fehler - + information_popup_disconnected_account_message "Votre compte est déconnecté" Ihr Konto ist getrennt @@ -3058,7 +3058,7 @@ Error CreationFormLayout - + search_bar_look_for_contact_text "Rechercher un contact" Kontakt suchen @@ -5238,49 +5238,49 @@ Pour les activer dans un projet commercial, merci de nous contacter. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 Die Anrufadresse ist keine interpretierbare SIP-Adresse: %1 - + group_call_error_no_account - + group_call_error_participants_invite - + group_call_error_creation - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss - + conference_invitation - + conference_invitation_updated - + conference_invitation_cancelled - + unknown_audio_device_name Unbekannter Gerätename diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 57f7502df..cb434a781 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Connected - + drawer_menu_account_connection_status_refreshing Refreshing… - + drawer_menu_account_connection_status_progress Connecting… - + drawer_menu_account_connection_status_failed Error - + drawer_menu_account_connection_status_cleared Disabled - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." You are online and reachable. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Connection error, check your settings. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Account disabled, you will not receive calls or messages. @@ -695,76 +695,76 @@ CallCore - + call_record_end_message "Enregistrement terminé" Recording ended - + call_record_saved_in_file_message "L'appel a été enregistré dans le fichier : %1" Recording has been saved in file : %1 - - + + call_stats_codec_label "Codec: %1 / %2 kHz" Codec: %1 / %2 kHz - - + + call_stats_bandwidth_label "Bande passante : %1 %2 kbits/s %3 %4 kbits/s" Bandwidth : %1 %2 kbits/s %3 %4 kbits/s - - + + call_stats_loss_rate_label "Taux de perte: %1% %2%" Loss rate: %1% %2% - + call_stats_jitter_buffer_label "Tampon de gigue: %1 ms" Jitter buffer : %1 ms - + call_stats_resolution_label "Définition vidéo : %1 %2 %3 %4" Video resolution: %1 %2 %3 %4 - + call_stats_fps_label "FPS : %1 %2 %3 %4" FPS : %1 %2 %3 %4 - + media_encryption_dtls DTLS DTLS - + media_encryption_none None None - + media_encryption_srtp SRTP SRTP - + media_encryption_post_quantum "ZRTP - Post quantique" Post quantum ZRTP @@ -1418,15 +1418,15 @@ Transfer %1 to… - - + + call_transfer_confirm_dialog_tittle "Confirmer le transfert" Confirm transfer - - + + call_transfer_confirm_dialog_message "Vous allez transférer %1 à %2." You are going to transfer %1 to %2. @@ -1439,7 +1439,7 @@ - + call_action_show_dialer "Pavé numérique" Dialer @@ -1457,14 +1457,14 @@ Call list - + Merger tous les appels call_action_merge_calls Merge all calls - + call_action_go_to_settings "Paramètres" Settings @@ -1476,34 +1476,34 @@ Share your screen - + conference_share_link_title Partager le lien de la réunion Share meeting link - + copied Copié Copied - + information_popup_meeting_address_copied_to_clipboard Le lien de la réunion a été copié dans le presse-papier Meeting link has been copied to the clipboard - - - + + + conference_participants_list_title "Participants (%1)" Participants (%1) - - + + group_call_participant_selected %1 selected participant @@ -1511,7 +1511,7 @@ - + meeting_schedule_add_participants_title Add participants @@ -1528,132 +1528,132 @@ Statistics - + call_action_end_call "Terminer l'appel" End call - + call_action_resume_call "Reprendre l'appel" Resume call - + call_action_pause_call "Mettre l'appel en pause" Pause call - + call_action_transfer_call "Transférer l'appel" Transfer call - + call_action_start_new_call_hint "Initier un nouvel appel" Start new call - + call_display_call_list_hint "Afficher la liste d'appels" View call list - + call_deactivate_video_hint "Désactiver la vidéo" "Activer la vidéo" Turn off video - + call_activate_video_hint Enable video - + call_activate_microphone "Activer le micro" Activate microphone - + call_deactivate_microphone "Désactiver le micro" Mute microphone - + call_share_screen_hint Partager l'écran… Share screen… - + call_open_chat_hint Open chat… Open conversation… - + call_rise_hand_hint "Lever la main" Rise hand - + call_send_reaction_hint "Envoyer une réaction" Send reaction - + call_manage_participants_hint "Gérer les participants" Manage participants - + call_more_options_hint "Plus d'options…" More options… - + call_action_change_conference_layout "Modifier la disposition" Change layout - + call_action_full_screen "Mode Plein écran" Full screen mode - + call_action_stop_recording "Terminer l'enregistrement" End recording - + call_action_record "Enregistrer l'appel" Record call - + call_activate_speaker_hint "Activer le son" Activate speaker - + call_deactivate_speaker_hint "Désactiver le son" Mute speaker @@ -1784,13 +1784,13 @@ ChatCore - + info_toast_deleted_title Deleted Deleted - + info_toast_deleted_message_history Message history has been deleted Message history has been deleted @@ -2223,31 +2223,31 @@ Only your correspondent can decrypt them. New conversation - + chat_start_group_chat_title "Nouveau groupe" New group - + chat_action_start_group_chat "Créer" Create - - + + information_popup_error_title Error - + group_chat_error_must_have_name "Un nom doit être donné au groupe A name must be set for the group - + group_call_error_not_connected "Vous n'etes pas connecté" You are not connected @@ -2310,13 +2310,13 @@ Only your correspondent can decrypt them. ConferenceInfoCore - + information_popup_error_title "Erreur" Error - + information_popup_disconnected_account_message "Votre compte est déconnecté" Your account is disconnected @@ -2971,7 +2971,7 @@ Only your correspondent can decrypt them. CreationFormLayout - + search_bar_look_for_contact_text "Rechercher un contact" Find contact @@ -5127,49 +5127,49 @@ To enable them in a commercial project, please contact us. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 The calling address is not an interpretable SIP address : %1 - + group_call_error_no_account No default account found, can't create group call - + group_call_error_participants_invite Couldn't invite participants to group call - + group_call_error_creation Group call couldn't be created - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss Voice recording (%1) - + unknown_audio_device_name Unknown device name - + conference_invitation Meeting invitation - + conference_invitation_cancelled Meeting cancellation - + conference_invitation_updated Meeting modification diff --git a/Linphone/data/languages/fr_FR.ts b/Linphone/data/languages/fr_FR.ts index cbbe89409..f3fa19510 100644 --- a/Linphone/data/languages/fr_FR.ts +++ b/Linphone/data/languages/fr_FR.ts @@ -27,45 +27,45 @@ AccountCore - + drawer_menu_account_connection_status_connected "Connecté" Connecté - + drawer_menu_account_connection_status_refreshing En cours de rafraîchissement… - + drawer_menu_account_connection_status_progress Connexion… - + drawer_menu_account_connection_status_failed Erreur - + drawer_menu_account_connection_status_cleared Désactivé - + manage_account_status_connected_summary "Vous êtes en ligne et joignable." Vous êtes en ligne et joignable. - + manage_account_status_failed_summary "Erreur de connexion, vérifiez vos paramètres." Erreur de connexion, vérifiez vos paramètres. - + manage_account_status_cleared_summary "Compte désactivé, vous ne recevrez ni appel ni message." Compte désactivé, vous ne recevrez ni appel ni message. @@ -695,76 +695,76 @@ CallCore - + call_record_end_message "Enregistrement terminé" Enregistrement terminé - + call_record_saved_in_file_message "L'appel a été enregistré dans le fichier : %1" L'appel a été enregistré dans le fichier : %1 - - + + call_stats_codec_label "Codec: %1 / %2 kHz" Codec: %1 / %2 kHz - - + + call_stats_bandwidth_label "Bande passante : %1 %2 kbits/s %3 %4 kbits/s" Bande passante : %1 %2 kbits/s %3 %4 kbits/s - - + + call_stats_loss_rate_label "Taux de perte: %1% %2%" Taux de perte: %1% %2% - + call_stats_jitter_buffer_label "Tampon de gigue: %1 ms" Tampon de gigue: %1 ms - + call_stats_resolution_label "Définition vidéo : %1 %2 %3 %4" Définition vidéo : %1 %2 %3 %4 - + call_stats_fps_label "FPS : %1 %2 %3 %4" FPS : %1 %2 %3 %4 - + media_encryption_dtls DTLS DTLS - + media_encryption_none None None - + media_encryption_srtp SRTP SRTP - + media_encryption_post_quantum "ZRTP - Post quantique" ZRTP - Post quantique @@ -1418,15 +1418,15 @@ Transférer %1 à… - - + + call_transfer_confirm_dialog_tittle "Confirmer le transfert" Confirmer le transfert - - + + call_transfer_confirm_dialog_message "Vous allez transférer %1 à %2." Vous allez transférer %1 à %2. @@ -1439,7 +1439,7 @@ - + call_action_show_dialer "Pavé numérique" Pavé numérique @@ -1457,14 +1457,14 @@ Liste d'appel - + Merger tous les appels call_action_merge_calls Merger tous les appels - + call_action_go_to_settings "Paramètres" Paramètres @@ -1476,34 +1476,34 @@ Partage de votre écran - + conference_share_link_title Partager le lien de la réunion Partager le lien de la réunion - + copied Copié Copié - + information_popup_meeting_address_copied_to_clipboard Le lien de la réunion a été copié dans le presse-papier Le lien de la réunion a été copié dans le presse-papier - - - + + + conference_participants_list_title "Participants (%1)" Participants (%1) - - + + group_call_participant_selected %1 participant sélectionné @@ -1511,7 +1511,7 @@ - + meeting_schedule_add_participants_title Ajouter des participants @@ -1528,132 +1528,132 @@ Statistiques - + call_action_end_call "Terminer l'appel" Terminer l'appel - + call_action_resume_call "Reprendre l'appel" Reprendre l'appel - + call_action_pause_call "Mettre l'appel en pause" Mettre l'appel en pause - + call_action_transfer_call "Transférer l'appel" Transférer l'appel - + call_action_start_new_call_hint "Initier un nouvel appel" Initier un nouvel appel - + call_display_call_list_hint "Afficher la liste d'appels" Afficher la liste d'appels - + call_deactivate_video_hint "Désactiver la vidéo" "Activer la vidéo" Désactiver la vidéo - + call_activate_video_hint Activer la vidéo - + call_activate_microphone "Activer le micro" Activer le micro - + call_deactivate_microphone "Désactiver le micro" Désactiver le micro - + call_share_screen_hint Partager l'écran… Partager l'écran… - + call_open_chat_hint Open chat… Ouvrir le chat… - + call_rise_hand_hint "Lever la main" Lever la main - + call_send_reaction_hint "Envoyer une réaction" Envoyer une réaction - + call_manage_participants_hint "Gérer les participants" Gérer les participants - + call_more_options_hint "Plus d'options…" Plus d'options… - + call_action_change_conference_layout "Modifier la disposition" Modifier la disposition - + call_action_full_screen "Mode Plein écran" Mode Plein écran - + call_action_stop_recording "Terminer l'enregistrement" Terminer l'enregistrement - + call_action_record "Enregistrer l'appel" Enregistrer l'appel - + call_activate_speaker_hint "Activer le son" Activer le son - + call_deactivate_speaker_hint "Désactiver le son" Désactiver le son @@ -1784,13 +1784,13 @@ ChatCore - + info_toast_deleted_title Deleted Supprimé - + info_toast_deleted_message_history Message history has been deleted L'historique des messages a été supprimé @@ -2223,31 +2223,31 @@ en bout. Seul votre correspondant peut les déchiffrer. Nouvelle conversation - + chat_start_group_chat_title "Nouveau groupe" Nouveau groupe - + chat_action_start_group_chat "Créer" Créer - - + + information_popup_error_title Erreur - + group_chat_error_must_have_name "Un nom doit être donné au groupe Un nom doit être donné au groupe - + group_call_error_not_connected "Vous n'etes pas connecté" Vous n'êtes pas connecté @@ -2310,13 +2310,13 @@ en bout. Seul votre correspondant peut les déchiffrer. ConferenceInfoCore - + information_popup_error_title "Erreur" Erreur - + information_popup_disconnected_account_message "Votre compte est déconnecté" Votre compte est déconnecté @@ -2971,7 +2971,7 @@ en bout. Seul votre correspondant peut les déchiffrer. CreationFormLayout - + search_bar_look_for_contact_text "Rechercher un contact" Rechercher un contact @@ -5127,49 +5127,49 @@ Pour les activer dans un projet commercial, merci de nous contacter. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 L'adresse n'est pas interprétable comme une adresse SIP - + group_call_error_no_account Impossible de créer l'appel de groupe, le compte par défaut n'est pas défini - + group_call_error_participants_invite Impossible d'inviter les participants à l'appel de groupe - + group_call_error_creation L'appel de groupe n'a pas pu être créé - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss Message vocal (%1) - + unknown_audio_device_name Appareil inconnu - + conference_invitation Invitation à une réunion - + conference_invitation_cancelled Annulation d'une réunion - + conference_invitation_updated Modification d'une réunion diff --git a/Linphone/model/account/AccountModel.cpp b/Linphone/model/account/AccountModel.cpp index 5bb044948..6f59efd57 100644 --- a/Linphone/model/account/AccountModel.cpp +++ b/Linphone/model/account/AccountModel.cpp @@ -125,7 +125,7 @@ void AccountModel::setPictureUri(QString uri) { // Hack because Account doesn't provide callbacks on updated data // emit pictureUriChanged(uri); auto core = CoreModel::getInstance()->getCore(); - emit CoreModel::getInstance() -> defaultAccountChanged(core, core->getDefaultAccount()); + emit CoreModel::getInstance()->defaultAccountChanged(core, core->getDefaultAccount()); } void AccountModel::onDefaultAccountChanged() { @@ -182,7 +182,7 @@ void AccountModel::setDisplayName(QString displayName) { // Hack because Account doesn't provide callbacks on updated data // emit displayNameChanged(displayName); auto core = CoreModel::getInstance()->getCore(); - emit CoreModel::getInstance() -> defaultAccountChanged(core, core->getDefaultAccount()); + emit CoreModel::getInstance()->defaultAccountChanged(core, core->getDefaultAccount()); } void AccountModel::setDialPlan(int index) { @@ -261,8 +261,8 @@ linphone::TransportType AccountModel::getTransport() const { void AccountModel::setTransport(linphone::TransportType value, bool save) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - auto params = mMonitor->getParams()->clone(); - if (params->getServerAddress()) { + if (mMonitor->getParams()->getServerAddress()) { + auto params = mMonitor->getParams()->clone(); auto addressClone = params->getServerAddress()->clone(); addressClone->setTransport(value); params->setServerAddress(addressClone); diff --git a/Linphone/model/chat/ChatModel.cpp b/Linphone/model/chat/ChatModel.cpp index 59fbcac56..661b778fe 100644 --- a/Linphone/model/chat/ChatModel.cpp +++ b/Linphone/model/chat/ChatModel.cpp @@ -84,13 +84,13 @@ QString ChatModel::getIdentifier() const { QString ChatModel::getTitle() { if (mMonitor->hasCapability((int)linphone::ChatRoom::Capabilities::Basic)) { - return ToolModel::getDisplayName(mMonitor->getPeerAddress()->clone()); + return ToolModel::getDisplayName(mMonitor->getPeerAddress()); } else { if (mMonitor->hasCapability((int)linphone::ChatRoom::Capabilities::OneToOne)) { auto participants = mMonitor->getParticipants(); if (participants.size() > 0) { auto peer = participants.front(); - return peer ? ToolModel::getDisplayName(peer->getAddress()->clone()) : ""; + return peer ? ToolModel::getDisplayName(peer->getAddress()) : ""; } else { return ""; } diff --git a/Linphone/model/conference/ConferenceInfoModel.cpp b/Linphone/model/conference/ConferenceInfoModel.cpp index d211dda2c..5f33e33d8 100644 --- a/Linphone/model/conference/ConferenceInfoModel.cpp +++ b/Linphone/model/conference/ConferenceInfoModel.cpp @@ -110,7 +110,7 @@ linphone::ConferenceInfo::State ConferenceInfoModel::getState() const { QString ConferenceInfoModel::getOrganizerName() const { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - auto organizer = mConferenceInfo->getOrganizer()->clone(); + auto organizer = mConferenceInfo->getOrganizer(); return ToolModel::getDisplayName(organizer); } diff --git a/Linphone/model/core/CoreModel.cpp b/Linphone/model/core/CoreModel.cpp index 06a4ea34f..cd8096a20 100644 --- a/Linphone/model/core/CoreModel.cpp +++ b/Linphone/model/core/CoreModel.cpp @@ -70,15 +70,6 @@ std::shared_ptr CoreModel::create(const QString &configPath, QThread } void CoreModel::start() { - mIterateTimer = new QTimer(this); - mIterateTimer->setInterval(30); - connect(mIterateTimer, &QTimer::timeout, [this]() { - static int iterateCount = 0; - if (iterateCount != 0) lCritical() << log().arg("Multi Iterate ! "); - ++iterateCount; - mCore->iterate(); - --iterateCount; - }); setPathBeforeCreation(); mCore = linphone::Factory::get()->createCore(Utils::appStringToCoreString(Paths::getConfigFilePath(mConfigPath)), @@ -122,6 +113,11 @@ void CoreModel::start() { mCore->enableFriendListSubscription(true); if (mCore->getLogCollectionUploadServerUrl().empty()) mCore->setLogCollectionUploadServerUrl(Constants::DefaultUploadLogsServer); + + mIterateTimer = new QTimer(this); + mIterateTimer->setInterval(20); + connect(mIterateTimer, &QTimer::timeout, [this]() { mCore->iterate(); }); + mIterateTimer->start(); auto linphoneSearch = mCore->createMagicSearch(); diff --git a/Linphone/model/friend/FriendsManager.cpp b/Linphone/model/friend/FriendsManager.cpp index 3bce51fbc..04577b629 100644 --- a/Linphone/model/friend/FriendsManager.cpp +++ b/Linphone/model/friend/FriendsManager.cpp @@ -122,7 +122,7 @@ bool FriendsManager::isInOtherAddresses(const QString &key) { return mOtherAddresses.contains(key); } -void FriendsManager::appendKnownFriend(std::shared_ptr address, +void FriendsManager::appendKnownFriend(std::shared_ptr address, std::shared_ptr f) { auto key = Utils::coreStringToAppString(address->asStringUriOnly()); if (mKnownFriends.contains(key)) { @@ -132,7 +132,7 @@ void FriendsManager::appendKnownFriend(std::shared_ptr addres mKnownFriends.insert(key, QVariant::fromValue(f)); } -void FriendsManager::appendUnknownFriend(std::shared_ptr address, +void FriendsManager::appendUnknownFriend(std::shared_ptr address, std::shared_ptr f) { auto key = Utils::coreStringToAppString(address->asStringUriOnly()); if (mUnknownFriends.contains(key)) { diff --git a/Linphone/model/friend/FriendsManager.hpp b/Linphone/model/friend/FriendsManager.hpp index 5d42b1582..99188abe1 100644 --- a/Linphone/model/friend/FriendsManager.hpp +++ b/Linphone/model/friend/FriendsManager.hpp @@ -21,12 +21,12 @@ #ifndef FRIENDS_MANAGER_H_ #define FRIENDS_MANAGER_H_ +#include "tool/AbstractObject.hpp" #include #include #include #include #include -#include "tool/AbstractObject.hpp" class FriendsManager : public QObject, public AbstractObject { Q_OBJECT @@ -41,19 +41,19 @@ public: QVariantMap getUnknownFriends() const; QStringList getOtherAddresses() const; - std::shared_ptr getKnownFriendAtKey(const QString& key); - std::shared_ptr getUnknownFriendAtKey(const QString& key); + std::shared_ptr getKnownFriendAtKey(const QString &key); + std::shared_ptr getUnknownFriendAtKey(const QString &key); - bool isInKnownFriends(const QString& key); - bool isInUnknownFriends(const QString& key); - bool isInOtherAddresses(const QString& key); + bool isInKnownFriends(const QString &key); + bool isInUnknownFriends(const QString &key); + bool isInOtherAddresses(const QString &key); - void appendKnownFriend(std::shared_ptr address, std::shared_ptr f); - void appendUnknownFriend(std::shared_ptr address, std::shared_ptr f); + void appendKnownFriend(std::shared_ptr address, std::shared_ptr f); + void appendUnknownFriend(std::shared_ptr address, std::shared_ptr f); void appendOtherAddress(QString address); - void removeUnknownFriend(const QString& key); - void removeOtherAddress(const QString& key); + void removeUnknownFriend(const QString &key); + void removeOtherAddress(const QString &key); private: static std::shared_ptr gFriendsManager; diff --git a/Linphone/model/search/MagicSearchModel.cpp b/Linphone/model/search/MagicSearchModel.cpp index 0c3cf4416..366d7d2db 100644 --- a/Linphone/model/search/MagicSearchModel.cpp +++ b/Linphone/model/search/MagicSearchModel.cpp @@ -87,9 +87,9 @@ void MagicSearchModel::onSearchResultsReceived(const std::shared_ptrgetFriend(); auto friendsManager = FriendsManager::getInstance(); if (f) { - auto friendAddress = f->getAddress() ? f->getAddress()->clone() : nullptr; + auto friendAddress = f->getAddress() ? f->getAddress() : nullptr; if (friendAddress) { - friendAddress->clean(); + // friendAddress->clean(); qDebug() << "friend exists, append to unknown map"; friendsManager->appendUnknownFriend(friendAddress, f); if (friendsManager->isInOtherAddresses( diff --git a/Linphone/model/tool/ToolModel.cpp b/Linphone/model/tool/ToolModel.cpp index 8df490ca8..80080d479 100644 --- a/Linphone/model/tool/ToolModel.cpp +++ b/Linphone/model/tool/ToolModel.cpp @@ -81,7 +81,7 @@ std::shared_ptr ToolModel::findAudioDevice(const QString return nullptr; } -QString ToolModel::getDisplayName(const std::shared_ptr &address) { +QString ToolModel::getDisplayName(const std::shared_ptr &address) { QString displayName; if (address) { auto linFriend = findFriendByAddress(address); @@ -195,9 +195,9 @@ QString ToolModel::encodeTextToQmlRichFormat(const QString &text, if (it != participants.end()) { auto foundParticipant = *it; // participants.at(std::distance(participants.begin(), it)); - auto address = foundParticipant->getAddress()->clone(); + auto address = foundParticipant->getAddress(); auto isFriend = findFriendByAddress(address); - address->clean(); + // address->clean(); auto addressString = Utils::coreStringToAppString(address->asStringUriOnly()); if (isFriend) part = "@" + Utils::coreStringToAppString(isFriend->getAddress()->getDisplayName()); @@ -221,17 +221,15 @@ QString ToolModel::encodeTextToQmlRichFormat(const QString &text, } std::shared_ptr ToolModel::findFriendByAddress(const QString &address) { - auto defaultFriendList = CoreModel::getInstance()->getCore()->getDefaultFriendList(); - if (!defaultFriendList) return nullptr; auto linphoneAddr = ToolModel::interpretUrl(address); if (linphoneAddr) return ToolModel::findFriendByAddress(linphoneAddr); else return nullptr; } std::shared_ptr -ToolModel::findFriendByAddress(const std::shared_ptr &linphoneAddr) { +ToolModel::findFriendByAddress(const std::shared_ptr &linphoneAddr) { auto friendsManager = FriendsManager::getInstance(); - linphoneAddr->clean(); + // linphoneAddr->clean(); QString key = Utils::coreStringToAppString(linphoneAddr->asStringUriOnly()); if (friendsManager->isInKnownFriends(key)) { // qDebug() << key << "have been found in known friend, return it"; @@ -598,7 +596,7 @@ ToolModel::getChatRoomParams(std::shared_ptr call, std::shared_p auto core = call ? call->getCore() : CoreModel::getInstance()->getCore(); auto localAddress = call ? call->getCallLog()->getLocalAddress() : nullptr; if (!remoteAddress && call) remoteAddress = call->getRemoteAddress()->clone(); - remoteAddress->clean(); + // remoteAddress->clean(); auto account = findAccount(localAddress); if (!account) account = core->getDefaultAccount(); if (!account) qWarning() << "failed to get account, return"; diff --git a/Linphone/model/tool/ToolModel.hpp b/Linphone/model/tool/ToolModel.hpp index 919584a50..b53d066a4 100644 --- a/Linphone/model/tool/ToolModel.hpp +++ b/Linphone/model/tool/ToolModel.hpp @@ -47,7 +47,7 @@ public: static bool isLocal(const std::shared_ptr &conference, const std::shared_ptr &device); - static QString getDisplayName(const std::shared_ptr &address); + static QString getDisplayName(const std::shared_ptr &address); static QString getDisplayName(QString address); static QString encodeTextToQmlRichFormat(const QString &text, @@ -56,7 +56,7 @@ public: static std::shared_ptr findFriendByAddress(const QString &address); static std::shared_ptr - findFriendByAddress(const std::shared_ptr &linphoneAddr); + findFriendByAddress(const std::shared_ptr &linphoneAddr); static bool createCall(const QString &sipAddress, const QVariantMap &options = {}, diff --git a/Linphone/view/Control/Container/CreationFormLayout.qml b/Linphone/view/Control/Container/CreationFormLayout.qml index 2ca99cc14..9d61bf362 100644 --- a/Linphone/view/Control/Container/CreationFormLayout.qml +++ b/Linphone/view/Control/Container/CreationFormLayout.qml @@ -19,6 +19,7 @@ FocusScope { clip: true property alias topContent: topLayout.data property bool topLayoutVisible: topLayout.children.length > 0 + property int searchBarRightMaring: Math.round(39 * DefaultStyle.dp) ColumnLayout { anchors.fill: parent @@ -36,7 +37,7 @@ FocusScope { id: searchBar Layout.alignment: Qt.AlignTop Layout.fillWidth: true - // Layout.rightMargin: Math.round(39 * DefaultStyle.dp) + Layout.rightMargin: mainItem.searchBarRightMaring focus: true color: mainItem.searchBarColor borderColor: mainItem.searchBarBorderColor diff --git a/Linphone/view/Page/Main/Chat/ChatPage.qml b/Linphone/view/Page/Main/Chat/ChatPage.qml index 127bc90b8..c4405a4af 100644 --- a/Linphone/view/Page/Main/Chat/ChatPage.qml +++ b/Linphone/view/Page/Main/Chat/ChatPage.qml @@ -260,6 +260,7 @@ AbstractMainPage { id: newChatForm Layout.fillWidth: true Layout.fillHeight: true + Layout.rightMargin: Math.round(8 * DefaultStyle.dp) Layout.topMargin: Math.round(18 * DefaultStyle.dp) onGroupCreationRequested: { console.log("groupe call requetsed") diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml index f053cf6e1..26432068b 100644 --- a/Linphone/view/Page/Window/Call/CallsWindow.qml +++ b/Linphone/view/Page/Window/Call/CallsWindow.qml @@ -726,6 +726,7 @@ AbstractWindow { displayCurrentCalls: true searchBarColor: DefaultStyle.grey_0 searchBarBorderColor: DefaultStyle.grey_200 + searchBarRightMaring: 0 onContactClicked: contact => { var callsWin = UtilsCpp.getCallsWindow() if (contact)