diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index 548b14a0..a7f1ac60 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -144,6 +144,7 @@ CallCore::CallCore(const std::shared_ptr &call) : QObject(nullpt mRemoteTokens = mCallModel->getRemoteAtuhenticationTokens(); mEncryption = LinphoneEnums::fromLinphone(call->getParams()->getMediaEncryption()); auto tokenVerified = call->getAuthenticationTokenVerified(); + mIsMismatch = call->getZrtpCacheMismatchFlag(); mIsSecured = (mEncryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) || mEncryption == LinphoneEnums::MediaEncryption::Srtp || mEncryption == LinphoneEnums::MediaEncryption::Dtls; @@ -236,9 +237,9 @@ void CallCore::setSelf(QSharedPointer me) { }); mCallModelConnection->makeConnectToModel(&CallModel::authenticationTokenVerified, [this](const std::shared_ptr &call, bool verified) { - auto isMismatch = mCallModel->getZrtpCaseMismatch(); - mCallModelConnection->invokeToCore([this, verified, isMismatch]() { + mCallModelConnection->invokeToCore([this, verified]() { setTokenVerified(verified); + setIsMismatch(!verified); emit tokenVerified(); }); }); diff --git a/Linphone/core/conference/ConferenceInfoCore.cpp b/Linphone/core/conference/ConferenceInfoCore.cpp index e725b923..a06b5564 100644 --- a/Linphone/core/conference/ConferenceInfoCore.cpp +++ b/Linphone/core/conference/ConferenceInfoCore.cpp @@ -525,18 +525,13 @@ void ConferenceInfoCore::writeFromModel(const std::shared_ptrgetOrganizerAddress(); mDescription = model->getDescription(); mParticipants.clear(); - QStringList participantAddresses; for (auto &infos : model->getParticipantInfos()) { - participantAddresses.append(Utils::coreStringToAppString(infos->getAddress()->asStringUriOnly())); + auto address = Utils::coreStringToAppString(infos->getAddress()->asStringUriOnly()); + QVariantMap participant; + participant["address"] = address; + participant["role"] = (int)LinphoneEnums::ParticipantRole::Listener; + mParticipants.append(participant); } - mConfInfoModelConnection->invokeToModel([this, participantAddresses]() { // Copy values to avoid concurrency - for (auto &address : participantAddresses) { - QVariantMap participant; - participant["address"] = address; - participant["role"] = (int)LinphoneEnums::ParticipantRole::Listener; - mParticipants.append(participant); - } - }); } void ConferenceInfoCore::writeIntoModel(std::shared_ptr model) { diff --git a/Linphone/view/Control/Button/IconLabelButton.qml b/Linphone/view/Control/Button/IconLabelButton.qml index be360a07..66ffe711 100644 --- a/Linphone/view/Control/Button/IconLabelButton.qml +++ b/Linphone/view/Control/Button/IconLabelButton.qml @@ -15,6 +15,7 @@ Button { style: ButtonStyle.hoveredBackground contentItem: RowLayout { + spacing: 5 * DefaultStyle.dp EffectImage { imageSource: mainItem.icon.source imageWidth: mainItem.icon.width @@ -27,9 +28,9 @@ Button { Layout.preferredWidth: mainItem.icon.width Layout.preferredHeight: mainItem.icon.height } - Text{ - horizontalAlignment: mainItem.textHAlignment - verticalAlignment: Text.AlignLeft + Text { + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter Layout.preferredWidth: textMetrics.advanceWidth wrapMode: Text.WrapAnywhere text: mainItem.text @@ -53,6 +54,6 @@ Button { font.bold: true } } - Item{Layout.fillWidth: true} + Item {Layout.fillWidth: true} } } diff --git a/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml b/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml index 56fba522..0ec02d2e 100644 --- a/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml +++ b/Linphone/view/Control/Container/Call/ActiveSpeakerLayout.qml @@ -46,6 +46,7 @@ Item { property var address: participantDevice && participantDevice.core.address videoEnabled: (participantDevice && participantDevice.core.videoEnabled) || (!participantDevice && call && call.core.remoteVideoEnabled) qmlName: 'AS' + securityBreach: !mainItem.conference && mainItem.call?.core.isMismatch displayPresence: false Binding { target: mainItem diff --git a/Linphone/view/Control/Display/Call/CallListView.qml b/Linphone/view/Control/Display/Call/CallListView.qml index 16060cf1..0dfcf350 100644 --- a/Linphone/view/Control/Display/Call/CallListView.qml +++ b/Linphone/view/Control/Display/Call/CallListView.qml @@ -73,6 +73,7 @@ ListView { } Button { id: pausingButton + enabled: !(modelData.core.state === LinphoneEnums.CallState.PausedByRemote) Layout.preferredWidth: 28 * DefaultStyle.dp Layout.preferredHeight: 28 * DefaultStyle.dp Layout.alignment: Qt.AlignVCenter @@ -80,13 +81,12 @@ ListView { rightPadding: 5 * DefaultStyle.dp topPadding: 5 * DefaultStyle.dp bottomPadding: 5 * DefaultStyle.dp - property bool isPaused: modelData.core.state === LinphoneEnums.CallState.Paused - || modelData.core.state === LinphoneEnums.CallState.PausedByRemote - color: isPaused ? DefaultStyle.success_500main : DefaultStyle.grey_500 + property bool pausedByUser: modelData.core.state === LinphoneEnums.CallState.Paused + color: pausedByUser ? DefaultStyle.success_500main : DefaultStyle.grey_500 contentImageColor: DefaultStyle.grey_0 KeyNavigation.right: endCallButton KeyNavigation.left: endCallButton - icon.source: isPaused ? AppIcons.play : AppIcons.pause + icon.source: pausedByUser ? AppIcons.play : AppIcons.pause icon.width: 18 * DefaultStyle.dp icon.height: 18 * DefaultStyle.dp onClicked: modelData.core.lSetPaused(!modelData.core.paused) diff --git a/Linphone/view/Control/Display/Sticker.qml b/Linphone/view/Control/Display/Sticker.qml index 1ea52fe3..22154b73 100644 --- a/Linphone/view/Control/Display/Sticker.qml +++ b/Linphone/view/Control/Display/Sticker.qml @@ -16,6 +16,7 @@ Item { height: 300 width: 200 property bool previewEnabled + property bool securityBreach property CallGui call: null property ConferenceGui conference: call && call.core.conference || null property var callState: call && call.core.state || undefined @@ -108,6 +109,7 @@ Item { account: mainItem.account call: !mainItem.previewEnabled ? mainItem.call : null displayNameVal: mainItem.displayName + securityBreach: mainItem.securityBreach ? mainItem.securityBreach : securityLevel === LinphoneEnums.SecurityLevel.Unsafe } ColumnLayout{ id: joiningView diff --git a/Linphone/view/Page/Form/Login/LoginPage.qml b/Linphone/view/Page/Form/Login/LoginPage.qml index 72232eb0..9e2e0f96 100644 --- a/Linphone/view/Page/Form/Login/LoginPage.qml +++ b/Linphone/view/Page/Form/Login/LoginPage.qml @@ -17,13 +17,11 @@ LoginLayout { signal connectionSucceed() titleContent: [ - Button { + BigButton { enabled: mainItem.showBackButton opacity: mainItem.showBackButton ? 1.0 : 0 Layout.leftMargin: 79 * DefaultStyle.dp icon.source: AppIcons.leftArrow - icon.width: 24 * DefaultStyle.dp - icon.height: 24 * DefaultStyle.dp style: ButtonStyle.noBackground onClicked: { console.debug("[LoginLayout] User: return") diff --git a/Linphone/view/Page/Form/Register/RegisterPage.qml b/Linphone/view/Page/Form/Register/RegisterPage.qml index ff50ef68..573cea0e 100644 --- a/Linphone/view/Page/Form/Register/RegisterPage.qml +++ b/Linphone/view/Page/Form/Register/RegisterPage.qml @@ -33,7 +33,15 @@ LoginLayout { titleContent: [ RowLayout { spacing: 21 * DefaultStyle.dp - Layout.leftMargin: 119 * DefaultStyle.dp + Layout.leftMargin: 79 * DefaultStyle.dp + BigButton { + style: ButtonStyle.noBackground + icon.source: AppIcons.leftArrow + onClicked: { + console.debug("[RegisterPage] User: return") + returnToLogin() + } + } EffectImage { fillMode: Image.PreserveAspectFit imageSource: AppIcons.profile diff --git a/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml b/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml index f4523947..01802051 100644 --- a/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml +++ b/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml @@ -109,7 +109,6 @@ RowLayout { Layout.fillWidth: true } MediumButton { - Layout.preferredHeight: 47 * DefaultStyle.dp Layout.alignment: Qt.AlignRight | Qt.AlignHCenter text: qsTr("Ajouter") style: ButtonStyle.main diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index 30235b99..329eb4ad 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -304,15 +304,12 @@ AbstractMainPage { delegate: FocusScope { width:historyListView.width height: 56 * DefaultStyle.dp - anchors.topMargin: 5 * DefaultStyle.dp - anchors.bottomMargin: 5 * DefaultStyle.dp visible: !!modelData RowLayout { z: 1 anchors.fill: parent anchors.leftMargin: 10 * DefaultStyle.dp - anchors.rightMargin: 15 * DefaultStyle.dp spacing: 10 * DefaultStyle.dp Avatar { id: historyAvatar @@ -383,11 +380,8 @@ AbstractMainPage { } } BigButton { - padding: 0 style: ButtonStyle.noBackground icon.source: AppIcons.phone - // Layout.preferredWidth: 24 * DefaultStyle.dp - // Layout.preferredHeight: 24 * DefaultStyle.dp focus: true activeFocusOnTab: false onClicked: {