From 7c2e9f6c12af2d3ad91acb9fbc0ae13b03d51cd4 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Tue, 25 Nov 2025 11:00:43 +0100 Subject: [PATCH] fix binding loop on popup button closed remove debug do not force declining call when user in do not disturb status #LINQT-2129 #LINQT-2171 do not handle chat notifications when chat disabled change transfer direction (transfer paused call to current) #LINQT-2211 fix chat message image size in call #LINQT-2142 update translations fix crash remove auto switch audio device to avoid binding loop --- Linphone/core/notifier/Notifier.cpp | 3 - .../core/participant/ParticipantInfoList.cpp | 2 +- Linphone/data/languages/de.ts | 86 +++++++++---------- Linphone/data/languages/en.ts | 86 +++++++++---------- Linphone/data/languages/fr.ts | 86 +++++++++---------- Linphone/model/account/AccountManager.cpp | 8 -- Linphone/model/call/CallModel.cpp | 4 +- Linphone/model/core/CoreModel.cpp | 4 + Linphone/model/setting/SettingsModel.cpp | 6 +- Linphone/view/Control/Button/PopupButton.qml | 1 + .../view/Control/Display/Chat/ChatMessage.qml | 1 + .../Display/Chat/ChatMessageContent.qml | 11 +-- .../view/Page/Window/Call/CallsWindow.qml | 44 +++++----- 13 files changed, 170 insertions(+), 172 deletions(-) diff --git a/Linphone/core/notifier/Notifier.cpp b/Linphone/core/notifier/Notifier.cpp index 0175e2a10..890b831f6 100644 --- a/Linphone/core/notifier/Notifier.cpp +++ b/Linphone/core/notifier/Notifier.cpp @@ -288,9 +288,6 @@ void Notifier::notifyReceivedCall(const shared_ptr &call) { auto voicemailAddress = linphone::Factory::get()->createAddress( Utils::appStringToCoreString(accountModel->getVoicemailAddress())); if (voicemailAddress) call->transferTo(voicemailAddress); - } else { - lInfo() << log().arg("Declining call."); - call->decline(linphone::Reason::Busy); } return; } diff --git a/Linphone/core/participant/ParticipantInfoList.cpp b/Linphone/core/participant/ParticipantInfoList.cpp index fbb4703ec..75e77b29a 100644 --- a/Linphone/core/participant/ParticipantInfoList.cpp +++ b/Linphone/core/participant/ParticipantInfoList.cpp @@ -48,7 +48,7 @@ ParticipantInfoList::~ParticipantInfoList() { void ParticipantInfoList::setChatCore(const QSharedPointer &chatCore) { mustBeInMainThread(log().arg(Q_FUNC_INFO)); - if (mChatCore) disconnect(mChatCore.get()); + if (mChatCore) disconnect(mChatCore.get(), &ChatCore::participantsChanged, this, nullptr); mChatCore = chatCore; lDebug() << "[ParticipantInfoList] : set Chat " << mChatCore.get(); clearData(); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index bda7aaa3c..ab42d9d5e 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -104,43 +104,43 @@ AccountManager - + assistant_account_login_already_connected_error "The account is already connected" Das Konto ist bereits verbunden - + assistant_account_login_proxy_address_error "Unable to create proxy address. Please check the domain name." Proxy-Adresse konnte nicht erstellt werden. Bitte überprüfen Sie den Domänenname. - + assistant_account_login_address_configuration_error "Unable to configure address: `%1`." Folgende Adresse konnte nicht konfiguriert werden: `%1`. - + assistant_account_login_params_configuration_error "Unable to configure account settings." Kontoeinstellungen konnten nicht konfiguriert werden. - + assistant_account_login_forbidden_error "Username and password do not match" Benutzername und Passwort stimmen nicht überein - + assistant_account_login_error "Error during connection, please verify your parameters" Fehler bei der Verbindung - + assistant_account_add_error "Unable to add account." Konto konnte nicht hinzugefügt werden. @@ -1142,67 +1142,67 @@ CallModel - + call_error_no_response_toast "No response" - + call_error_forbidden_resource_toast "403 : Forbidden resource" - + call_error_not_answered_toast "Request timeout" - + call_error_user_declined_toast "User declined the call" Der Benutzer hat den Anruf abgelehnt - + call_error_user_not_found_toast "User was not found" Benutzer nicht gefunden - + call_error_user_busy_toast "User is busy" Der Benutzer ist beschäftigt - + call_error_incompatible_media_params_toast "User can&apos;t accept your call" Der Benutzer kann Ihren Anruf nicht annehmen - + call_error_io_error_toast "Unavailable service or network error" Dienst nicht verfügbar oder Netzwerkfehler - + call_error_do_not_disturb_toast "Le correspondant ne peut être dérangé" - + call_error_temporarily_unavailable_toast "Temporarily unavailable" Vorübergehend nicht verfügbar - + call_error_server_timeout_toast "Server tiemout" Server-Zeitüberschreitung @@ -2179,25 +2179,25 @@ ChatMessage - + chat_message_copy_selection "Copy selection" - + chat_message_copy "Copy" - + chat_message_copied_to_clipboard_title Copied Kopiert - + chat_message_copied_to_clipboard_toast "to clipboard" @@ -2233,25 +2233,25 @@ - + chat_message_reception_info "Reception info" - + chat_message_reply Reply - + chat_message_forward Forward - + chat_message_delete "Delete" Löschen @@ -2567,32 +2567,32 @@ Error - + chat_action_start_new_chat "New chat" - + chat_start_group_chat_title "Nouveau groupe" - + chat_action_start_group_chat "Créer" Erstellen - - - + + + information_popup_error_title Fehler - + information_popup_chat_creation_failed_message "La création a échoué" @@ -2603,25 +2603,25 @@ Error Der Codec konnte nicht installiert werden. - + group_chat_error_must_have_name "Un nom doit être donné au groupe - + group_chat_error_no_participant "Please select at least one participant - + group_call_error_not_connected "Vous n'etes pas connecté" Sie sind nicht verbunden - + chat_creation_in_progress Creation de la conversation en cours … @@ -5011,36 +5011,36 @@ Error Notifier - + new_call_alert_accessible_name New call from %1 - + new_voice_message 'Voice message received!' : message to warn the user in a notofication for voice messages. - + new_file_message - + new_conference_invitation 'Conference invitation received!' : Notification about receiving an invitation to a conference. - + new_chat_room_messages 'New messages received!' Notification that warn the user of new messages. - + new_message_alert_accessible_name New message on chatroom %1 diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index cb1d33aa7..477140e28 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -104,43 +104,43 @@ AccountManager - + assistant_account_login_already_connected_error "The account is already connected" The account is already connected - + assistant_account_login_proxy_address_error "Unable to create proxy address. Please check the domain name." Unable to create proxy address. Please check the domain name. - + assistant_account_login_address_configuration_error "Unable to configure address: `%1`." Unable to configure address: `%1`. - + assistant_account_login_params_configuration_error "Unable to configure account settings." Unable to configure account settings. - + assistant_account_login_forbidden_error "Username and password do not match" Username and password do not match - + assistant_account_login_error "Error during connection, please verify your parameters" Error during connection - + assistant_account_add_error "Unable to add account." Unable to add account. @@ -1137,67 +1137,67 @@ CallModel - + call_error_no_response_toast "No response" No response - + call_error_forbidden_resource_toast "403 : Forbidden resource" 403 : Forbidden resource - + call_error_not_answered_toast "Request timeout" Request timeout - + call_error_user_declined_toast "User declined the call" User declined the call - + call_error_user_not_found_toast "User was not found" User was not found - + call_error_user_busy_toast "User is busy" User is busy - + call_error_incompatible_media_params_toast "User can&apos;t accept your call" User can't accept your call - + call_error_io_error_toast "Unavailable service or network error" Unavailable service or network error - + call_error_do_not_disturb_toast "Le correspondant ne peut être dérangé" User cannot be disturbed - + call_error_temporarily_unavailable_toast "Temporarily unavailable" Temporarily unavailable - + call_error_server_timeout_toast "Server tiemout" Server tiemout @@ -2156,25 +2156,25 @@ ChatMessage - + chat_message_copy_selection "Copy selection" Copy selection - + chat_message_copy "Copy" Copy - + chat_message_copied_to_clipboard_title Copied Copied - + chat_message_copied_to_clipboard_toast "to clipboard" in clipboard @@ -2210,25 +2210,25 @@ You replied - + chat_message_reception_info "Reception info" Reception info - + chat_message_reply Reply Reply - + chat_message_forward Forward Forward - + chat_message_delete "Delete" Delete @@ -2541,56 +2541,56 @@ Only your correspondent can decrypt them. No conversation in history - + chat_action_start_new_chat "New chat" New conversation - + chat_start_group_chat_title "Nouveau groupe" New group - + chat_action_start_group_chat "Créer" Create - - - + + + information_popup_error_title Error - + information_popup_chat_creation_failed_message "La création a échoué" Creation failed - + group_chat_error_must_have_name "Un nom doit être donné au groupe A name must be set for the group - + group_chat_error_no_participant "Please select at least one participant Please select at least one participant - + group_call_error_not_connected "Vous n'etes pas connecté" You are not connected - + chat_creation_in_progress Creation de la conversation en cours … Chat creation pending… @@ -4918,36 +4918,36 @@ Expiration : %1 Notifier - + new_call_alert_accessible_name New call from %1 New call from %1 - + new_voice_message 'Voice message received!' : message to warn the user in a notofication for voice messages. Voice message received! - + new_file_message File received! - + new_conference_invitation 'Conference invitation received!' : Notification about receiving an invitation to a conference. Conference invitation received ! - + new_chat_room_messages 'New messages received!' Notification that warn the user of new messages. New messages received ! - + new_message_alert_accessible_name New message on chatroom %1 New message on chatroom %1 diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index ef4b1efa6..176204191 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -104,43 +104,43 @@ AccountManager - + assistant_account_login_already_connected_error "The account is already connected" Le compte est déjà connecté - + assistant_account_login_proxy_address_error "Unable to create proxy address. Please check the domain name." Impossible de créer l'adresse proxy. Merci de vérifier le nom de domaine. - + assistant_account_login_address_configuration_error "Unable to configure address: `%1`." Impossible de configurer l'adresse : `%1`. - + assistant_account_login_params_configuration_error "Unable to configure account settings." Impossible de configurer les paramètres du compte. - + assistant_account_login_forbidden_error "Username and password do not match" Le couple identifiant mot de passe ne correspond pas - + assistant_account_login_error "Error during connection, please verify your parameters" Erreur durant la connexion, veuillez vérifier vos paramètres - + assistant_account_add_error "Unable to add account." Impossible d'ajouter le compte. @@ -1137,67 +1137,67 @@ CallModel - + call_error_no_response_toast "No response" Pas de réponse - + call_error_forbidden_resource_toast "403 : Forbidden resource" 403 : Forbidden resource - + call_error_not_answered_toast "Request timeout" La requête a expiré - + call_error_user_declined_toast "User declined the call" Le correspondant a décliné l'appel - + call_error_user_not_found_toast "User was not found" Le correspondant n'a pas été trouvé - + call_error_user_busy_toast "User is busy" Le correspondant est occupé - + call_error_incompatible_media_params_toast "User can&apos;t accept your call" Le correspondant ne peut accepter votre appel - + call_error_io_error_toast "Unavailable service or network error" Service indisponible ou erreur réseau - + call_error_do_not_disturb_toast "Le correspondant ne peut être dérangé" Le correspondant ne peut être dérangé - + call_error_temporarily_unavailable_toast "Temporarily unavailable" Temporairement indisponible - + call_error_server_timeout_toast "Server tiemout" Délai d'attente du serveur dépassé @@ -2156,25 +2156,25 @@ ChatMessage - + chat_message_copy_selection "Copy selection" Copier la sélection - + chat_message_copy "Copy" Copier - + chat_message_copied_to_clipboard_title Copied Copié - + chat_message_copied_to_clipboard_toast "to clipboard" dans le presse-papiers @@ -2210,25 +2210,25 @@ Vous avez répondu - + chat_message_reception_info "Reception info" Info de réception - + chat_message_reply Reply Répondre - + chat_message_forward Forward Transférer - + chat_message_delete "Delete" Supprimer @@ -2541,56 +2541,56 @@ en bout. Seul votre correspondant peut les déchiffrer. Aucune conversation dans votre historique - + chat_action_start_new_chat "New chat" 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 - + information_popup_chat_creation_failed_message "La création a échoué" La création a échoué - + group_chat_error_must_have_name "Un nom doit être donné au groupe Un nom doit être donné au groupe - + group_chat_error_no_participant "Please select at least one participant Veuillez sélectionner au moins un participant - + group_call_error_not_connected "Vous n'etes pas connecté" Vous n'êtes pas connecté - + chat_creation_in_progress Creation de la conversation en cours … Création de la conversation en cours… @@ -4918,36 +4918,36 @@ Expiration : %1 Notifier - + new_call_alert_accessible_name New call from %1 Nouvel appel de %1 - + new_voice_message 'Voice message received!' : message to warn the user in a notofication for voice messages. Message vocal reçu ! - + new_file_message Fichier reçu ! - + new_conference_invitation 'Conference invitation received!' : Notification about receiving an invitation to a conference. Nouvelle invitation à une conférence ! - + new_chat_room_messages 'New messages received!' Notification that warn the user of new messages. Nouveaux messages reçus ! - + new_message_alert_accessible_name New message on chatroom %1 Nouveau message sur la conversation %1 diff --git a/Linphone/model/account/AccountManager.cpp b/Linphone/model/account/AccountManager.cpp index 8ef4817cb..068d87fa1 100644 --- a/Linphone/model/account/AccountManager.cpp +++ b/Linphone/model/account/AccountManager.cpp @@ -65,14 +65,6 @@ bool AccountManager::login(QString username, QString outboundProxyAddress, QString connectionId) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - qDebug() << "login with parameters :"; - qDebug() << "username" << username; - qDebug() << "password" << password; - qDebug() << "displayName" << displayName; - qDebug() << "domain" << domain; - qDebug() << "registrarUri" << registrarUri; - qDebug() << "outboundProxyAddress" << outboundProxyAddress; - qDebug() << "connectionId" << connectionId; auto core = CoreModel::getInstance()->getCore(); auto factory = linphone::Factory::get(); QString assistantFile = (!QString::compare(domain, "sip.linphone.org", Qt::CaseInsensitive) || domain.isEmpty()) diff --git a/Linphone/model/call/CallModel.cpp b/Linphone/model/call/CallModel.cpp index f4045ceac..a5359cc5e 100644 --- a/Linphone/model/call/CallModel.cpp +++ b/Linphone/model/call/CallModel.cpp @@ -104,7 +104,9 @@ void CallModel::transferTo(const std::shared_ptr &address) { void CallModel::transferToAnother(const std::shared_ptr &call) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - if (mMonitor->transferToAnother(call) == -1) + if (!call) return; + // Transfer paused call to current call + if (call->transferToAnother(mMonitor) == -1) lWarning() << log() .arg(QStringLiteral("Unable to transfer: `%1`.")) .arg(Utils::coreStringToAppString(call->getRemoteAddress()->asStringUriOnly())); diff --git a/Linphone/model/core/CoreModel.cpp b/Linphone/model/core/CoreModel.cpp index f963839d2..b1338577e 100644 --- a/Linphone/model/core/CoreModel.cpp +++ b/Linphone/model/core/CoreModel.cpp @@ -546,6 +546,7 @@ void CoreModel::onLogCollectionUploadProgressIndication(const std::shared_ptr
  • &core, const std::shared_ptr &room, const std::shared_ptr &message) { + if (SettingsModel::getInstance()->getDisableChatFeature()) return; if (message->isOutgoing()) return; emit unreadNotificationsChanged(); std::list> messages; @@ -558,6 +559,7 @@ void CoreModel::onMessageReceived(const std::shared_ptr &core, void CoreModel::onMessagesReceived(const std::shared_ptr &core, const std::shared_ptr &room, const std::list> &messages) { + if (SettingsModel::getInstance()->getDisableChatFeature()) return; std::list> finalMessages; for (auto &message : messages) { if (message->isOutgoing()) continue; @@ -575,6 +577,7 @@ void CoreModel::onNewMessageReaction(const std::shared_ptr &core const std::shared_ptr &chatRoom, const std::shared_ptr &message, const std::shared_ptr &reaction) { + if (SettingsModel::getInstance()->getDisableChatFeature()) return; emit newMessageReaction(core, chatRoom, message, reaction); } void CoreModel::onNotifyPresenceReceivedForUriOrTel( @@ -595,6 +598,7 @@ void CoreModel::onReactionRemoved(const std::shared_ptr &core, const std::shared_ptr &chatRoom, const std::shared_ptr &message, const std::shared_ptr &address) { + if (SettingsModel::getInstance()->getDisableChatFeature()) return; emit reactionRemoved(core, chatRoom, message, address); } void CoreModel::onTransferStateChanged(const std::shared_ptr &core, diff --git a/Linphone/model/setting/SettingsModel.cpp b/Linphone/model/setting/SettingsModel.cpp index d88bfd0c6..2810f5cd6 100644 --- a/Linphone/model/setting/SettingsModel.cpp +++ b/Linphone/model/setting/SettingsModel.cpp @@ -91,9 +91,9 @@ SettingsModel::SettingsModel() { [this](const std::shared_ptr &core, const std::shared_ptr &device) { lInfo() << log().arg("audio device changed"); if (device) lInfo() << "device :" << device->getDeviceName(); - emit playbackDeviceChanged(getPlaybackDevice()); - emit captureDeviceChanged(getCaptureDevice()); - emit ringerDeviceChanged(getRingerDevice()); + // emit playbackDeviceChanged(getPlaybackDevice()); + // emit captureDeviceChanged(getCaptureDevice()); + // emit ringerDeviceChanged(getRingerDevice()); }); } diff --git a/Linphone/view/Control/Button/PopupButton.qml b/Linphone/view/Control/Button/PopupButton.qml index fb42a3641..38d4724bd 100644 --- a/Linphone/view/Control/Button/PopupButton.qml +++ b/Linphone/view/Control/Button/PopupButton.qml @@ -55,6 +55,7 @@ Button { } function _getPreviousItem(content, index) { + if (!content.visible) return null if (content.visibleChildren.length == 0 || !hasFocusableChild(content)) return null; --index; diff --git a/Linphone/view/Control/Display/Chat/ChatMessage.qml b/Linphone/view/Control/Display/Chat/ChatMessage.qml index 0f3fb1b4e..16c3df312 100644 --- a/Linphone/view/Control/Display/Chat/ChatMessage.qml +++ b/Linphone/view/Control/Display/Chat/ChatMessage.qml @@ -254,6 +254,7 @@ Control.Control { chatGui: mainItem.chat searchedTextPart: mainItem.searchedTextPart chatMessageGui: mainItem.chatMessage + maxWidth: mainItem.maxWidth onMouseEvent: (event) => { mainItem.handleDefaultMouseEvent(event) } diff --git a/Linphone/view/Control/Display/Chat/ChatMessageContent.qml b/Linphone/view/Control/Display/Chat/ChatMessageContent.qml index a227d4ae4..7751fd8e2 100644 --- a/Linphone/view/Control/Display/Chat/ChatMessageContent.qml +++ b/Linphone/view/Control/Display/Chat/ChatMessageContent.qml @@ -30,9 +30,9 @@ ColumnLayout { property string searchedTextPart property int fileBorderWidth : 0 + property int maxWidth spacing: Utils.getSizeWithScreenRatio(5) - property int padding: Utils.getSizeWithScreenRatio(10) property ChatMessageContentProxy filescontentProxy: ChatMessageContentProxy { filterType: ChatMessageContentProxy.FilterContentType.File @@ -86,7 +86,7 @@ ColumnLayout { contentGui: mainItem.filescontentProxy.count === 1 ? mainItem.filescontentProxy.getChatMessageContentAtIndex(0) : null - width: Utils.getSizeWithScreenRatio(285) + Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter fillMode: Image.PreserveAspectFit } @@ -96,7 +96,7 @@ ColumnLayout { contentGui: mainItem.filescontentProxy.count === 1 ? mainItem.filescontentProxy.getChatMessageContentAtIndex(0) : null - Layout.preferredWidth: Utils.getSizeWithScreenRatio(285) + Layout.fillWidth: true Layout.preferredHeight: paintedHeight Layout.alignment: Qt.AlignHCenter fillMode: Image.PreserveAspectFit @@ -107,8 +107,9 @@ ColumnLayout { contentGui: mainItem.filescontentProxy.count === 1 ? mainItem.filescontentProxy.getChatMessageContentAtIndex(0) : null - width: Utils.getSizeWithScreenRatio(285) - height: Utils.getSizeWithScreenRatio(285) + Layout.fillWidth: true + width: Math.min(Utils.getSizeWithScreenRatio(285), mainItem.maxWidth) + height: Math.min(Utils.getSizeWithScreenRatio(285), mainItem.maxWidth) Layout.preferredWidth: videoOutput.contentRect.width Layout.preferredHeight: videoOutput.contentRect.height Layout.alignment: Qt.AlignHCenter diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml index fb0de7802..a60a9ea21 100644 --- a/Linphone/view/Page/Window/Call/CallsWindow.qml +++ b/Linphone/view/Page/Window/Call/CallsWindow.qml @@ -786,29 +786,29 @@ AbstractWindow { searchBarBorderColor: DefaultStyle.grey_200 searchBarRightMaring: 0 onContactClicked: contact => { - var callsWin = UtilsCpp.getCallsWindow() - if (contact) - //: "Confirmer le transfert" - callsWin.showConfirmationLambdaPopup(qsTr("call_transfer_confirm_dialog_tittle"), - //: "Vous allez transférer %1 à %2." - qsTr("call_transfer_confirm_dialog_message").arg(mainWindow.call.core.remoteName).arg(contact.core.fullName), "", - function (confirmed) { - if (confirmed) { - mainWindow.transferCallToContact(mainWindow.call,contact,newCallForm) - } - }) - } + var callsWin = UtilsCpp.getCallsWindow() + if (contact) + //: "Confirmer le transfert" + callsWin.showConfirmationLambdaPopup(qsTr("call_transfer_confirm_dialog_tittle"), + //: "Vous allez transférer %1 à %2." + qsTr("call_transfer_confirm_dialog_message").arg(mainWindow.call.core.remoteName).arg(contact.core.fullName), "", + function (confirmed) { + if (confirmed) { + mainWindow.transferCallToContact(mainWindow.call,contact,newCallForm) + } + }) + } onTransferCallToAnotherRequested: dest => { - var callsWin = UtilsCpp.getCallsWindow() - console.log("transfer to",dest) - callsWin.showConfirmationLambdaPopup(qsTr("call_transfer_confirm_dialog_tittle"), - qsTr("call_transfer_confirm_dialog_message").arg(mainWindow.call.core.remoteName).arg(dest.core.remoteName),"", - function (confirmed) { - if (confirmed) { - mainWindow.call.core.lTransferCallToAnother(dest.core.remoteAddress) - } - }) - } + var callsWin = UtilsCpp.getCallsWindow() + console.log("transfer to",dest) + callsWin.showConfirmationLambdaPopup(qsTr("call_transfer_confirm_dialog_tittle"), + qsTr("call_transfer_confirm_dialog_message").arg(mainWindow.call.core.remoteName).arg(dest.core.remoteName),"", + function (confirmed) { + if (confirmed) { + mainWindow.call.core.lTransferCallToAnother(dest.core.remoteAddress) + } + }) + } numPadPopup: numPadPopup NumericPadPopup {