Fix crash on removing participant.

Add more IMDN in message.
Fix dialogs top bar/margins.
Fix Video deconding with some devices.
This commit is contained in:
Julien Wadel 2022-05-10 18:19:37 +02:00
parent 2f5abc5c3b
commit 6528d2a946
23 changed files with 46 additions and 59 deletions

View file

@ -339,6 +339,7 @@
<file>ui/modules/Linphone/History/History.js</file>
<file>ui/modules/Linphone/History/Event.qml</file>
<file>ui/modules/Linphone/Menus/SipAddressesMenu.qml</file>
<file>ui/modules/Linphone/Menus/VideoConferenceMenu.qml</file>
<file>ui/modules/Linphone/Misc/MessageCounter.qml</file>
<file>ui/modules/Linphone/Notifications/NotificationBasic.qml</file>
<file>ui/modules/Linphone/Notifications/NotificationNewVersionAvailable.qml</file>
@ -376,6 +377,7 @@
<file>ui/modules/Linphone/Styles/Dialog/SipAddressDialogStyle.qml</file>
<file>ui/modules/Linphone/Styles/History/HistoryStyle.qml</file>
<file>ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml</file>
<file>ui/modules/Linphone/Styles/Menus/VideoConferenceMenuStyle.qml</file>
<file>ui/modules/Linphone/Styles/Misc/MessageCounterStyle.qml</file>
<file>ui/modules/Linphone/Styles/Notifications/NotificationBasicStyle.qml</file>
<file>ui/modules/Linphone/Styles/Notifications/NotificationReceivedCallStyle.qml</file>
@ -410,7 +412,6 @@
<file>ui/views/App/Calls/VideoConferenceActiveSpeaker.qml</file>
<file>ui/views/App/Calls/VideoConferenceFullscreen.qml</file>
<file>ui/views/App/Calls/VideoConferenceGrid.qml</file>
<file>ui/views/App/Calls/VideoConferenceMenu.qml</file>
<file>ui/views/App/Calls/Dialogs/CallSipAddress.qml</file>
<file>ui/views/App/Calls/Dialogs/CallTransfer.qml</file>
<file>ui/views/App/Calls/Dialogs/ConferenceManager.qml</file>
@ -484,7 +485,6 @@
<file>ui/views/App/Styles/Calls/CallsWindowStyle.qml</file>
<file>ui/views/App/Styles/Calls/ConferenceStyle.qml</file>
<file>ui/views/App/Styles/Calls/VideoConferenceStyle.qml</file>
<file>ui/views/App/Styles/Calls/VideoConferenceMenuStyle.qml</file>
<file>ui/views/App/Styles/Calls/WaitingRoomStyle.qml</file>
<file>ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml</file>
<file>ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml</file>

View file

@ -132,6 +132,10 @@ void Camera::updateWindowIdLocation(){
}
}
void Camera::removeParticipantDeviceModel(){
mParticipantDeviceModel = nullptr;
}
QQuickFramebufferObject::Renderer *Camera::createRenderer () const {
resetWindowId();
@ -229,7 +233,10 @@ void Camera::setIsReady(bool status) {
void Camera::setParticipantDeviceModel(ParticipantDeviceModel * participantDeviceModel){
if (mParticipantDeviceModel != participantDeviceModel) {
if( mParticipantDeviceModel)
disconnect(mParticipantDeviceModel, &QObject::destroyed, this, &Camera::removeParticipantDeviceModel);
mParticipantDeviceModel = participantDeviceModel;
connect(mParticipantDeviceModel, &QObject::destroyed, this, &Camera::removeParticipantDeviceModel);
updateWindowIdLocation();
update();
emit participantDeviceModelChanged(mParticipantDeviceModel);

View file

@ -89,6 +89,7 @@ private:
void activatePreview();
void deactivatePreview();
void updateWindowIdLocation();
void removeParticipantDeviceModel();
bool mIsPreview = false;
bool mIsReady = false;

View file

@ -37,6 +37,11 @@ ParticipantImdnStateListModel::ParticipantImdnStateListModel (std::shared_ptr<li
states.push_back(linphone::ChatMessage::State::DeliveredToUser);
states.push_back(linphone::ChatMessage::State::Displayed);
states.push_back(linphone::ChatMessage::State::NotDelivered);
states.push_back(linphone::ChatMessage::State::Idle);
states.push_back(linphone::ChatMessage::State::InProgress);
states.push_back(linphone::ChatMessage::State::FileTransferError);
states.push_back(linphone::ChatMessage::State::FileTransferDone);
states.push_back(linphone::ChatMessage::State::FileTransferInProgress);
for(int i = 0 ; i < states.size() ; ++i){
std::list<std::shared_ptr<linphone::ParticipantImdnState>> imdns = message->getParticipantsByImdnState(states[i]);
for(auto imdn : imdns){

View file

@ -16,9 +16,11 @@ Rectangle {
property alias descriptionText: description.text // Optionnal.
property int buttonsAlignment : Qt.AlignLeft
property bool flat : false
property bool showMargins: !flat
property bool expandHeight: flat
property alias showCloseCross : titleBar.showCloseCross
property alias showTitleBar: titleBar.showBar
property int buttonsLeftMargin :(buttonsAlignment & Qt.AlignLeft )== Qt.AlignLeft
? DialogStyle.buttons.leftMargin
@ -91,6 +93,7 @@ Rectangle {
Layout.fillHeight: (expandHeight ? true : !dialog.contentIsEmpty)
Layout.fillWidth: true
Layout.topMargin: (showMargins ? DialogStyle.content.topMargin : 0)
Layout.leftMargin: (showMargins ? DialogStyle.content.leftMargin : 0)
Layout.rightMargin: (showMargins ? DialogStyle.content.rightMargin : 0)
}

View file

@ -19,7 +19,7 @@ Item {
property bool flat: false
signal close()
height: showBar || showCloseCross ? (flat ? 60 : 30) : 0
height: showBar || showCloseCross ? (flat && text != '' ? 60 : 30) : 0
Rectangle{
anchors.fill:parent
@ -27,7 +27,7 @@ Item {
GradientStop { position: 0.0; color: DialogStyle.title.lowGradient }
GradientStop { position: 1.0; color: DialogStyle.title.highGradient }
}
visible:showBar && !flat
visible: showBar && !flat
}
Text {
id: title

View file

@ -31,6 +31,7 @@ QtObject {
property QtObject content: QtObject {
property int leftMargin: 25
property int rightMargin: 25
property int topMargin: 25
}
property QtObject description: QtObject {

View file

@ -259,6 +259,11 @@ Loader{
isCustom: true
colorSet: ChatCalendarMessageStyle.editButton
backgroundRadius: width/2
onClicked: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('../../../views/App/Main/Dialogs/NewConference.qml')
,{conferenceInfoModel: mainItem.conferenceInfoModel})
}
}
ActionButton{
isCustom: true

View file

@ -6,6 +6,7 @@ import QtQuick.Controls 2.12
import Common 1.0
import Common.Styles 1.0
import Linphone 1.0
import Linphone.Styles 1.0
import LinphoneUtils 1.0
import LinphoneEnums 1.0
@ -14,11 +15,6 @@ import UtilsCpp 1.0
import App.Styles 1.0
// Temp
import 'Incall.js' as Logic
import 'qrc:/ui/scripts/Utils/utils.js' as Utils
// =============================================================================
Rectangle{

View file

@ -38,6 +38,7 @@ singleton SipAddressDialogStyle 1.0 Dialog/SipAddressDialogStyle.
singleton HistoryStyle 1.0 History/HistoryStyle.qml
singleton SipAddressesMenuStyle 1.0 Menus/SipAddressesMenuStyle.qml
singleton VideoConferenceMenuStyle 1.0 Menus/VideoConferenceMenuStyle.qml
singleton MessageCounterStyle 1.0 Misc/MessageCounterStyle.qml

View file

@ -41,6 +41,7 @@ FileView 1.0 File/FileView.qml
History 1.0 History/History.qml
SipAddressesMenu 1.0 Menus/SipAddressesMenu.qml
VideoConferenceMenu 1.0 Menus/VideoConferenceMenu.qml
MessageCounter 1.0 Misc/MessageCounter.qml

View file

@ -34,7 +34,7 @@ DialogPlus {
}
}
]
buttonsAlignment: Qt.AlignCenter
descriptionText: qsTr('conferenceManagerDescription')

View file

@ -20,7 +20,8 @@ DialogPlus {
buttonsAlignment: Qt.AlignCenter
objectName: '__about'
flat: true
showMargins: true
height: AboutStyle.height + 30
width: AboutStyle.width

View file

@ -44,7 +44,6 @@ DialogPlus {
}
}
]
flat : true
showCloseCross: true
//: "Group information" : Popup title.
//~ This popup display data about the current chat room

View file

@ -39,7 +39,6 @@ DialogPlus {
}
}
]
flat : true
//: 'End-to-end encrypted' Popup title about encryption information.
title: qsTr('infoEncryptionTitle')
showCloseCross:false

View file

@ -21,7 +21,8 @@ DialogPlus {
buttonsAlignment: Qt.AlignCenter
objectName: '__manageAccounts'
flat: true
showMargins: true
height: SettingsModel.rlsUriEnabled ? ManageAccountsStyle.height : ManageAccountsStyle.heightWithoutPresence
width: ManageAccountsStyle.width

View file

@ -19,6 +19,10 @@ import 'qrc:/ui/scripts/Utils/utils.js' as Utils
DialogPlus {
id: conferenceManager
property ConferenceInfoModel conferenceInfoModel: ConferenceInfoModel{
property bool isNew: true
}
Connections{
target: conferenceInfoModel
onConferenceCreated: {
console.log("Conference has been created.")
creationStatus.icon = 'led_green'
@ -103,7 +107,7 @@ DialogPlus {
TextButtonB {
enabled: selectedParticipants.count >= conferenceManager.minParticipants && subject.text != '' && AccountSettingsModel.conferenceURI != ''
//: 'Launch' : Start button
text: qsTr('startButton')
text: conferenceInfoModel.isNew ? qsTr('startButton') : 'Mettre à jour'
capitalization: Font.AllUppercase
function getInviteMode(){
@ -162,7 +166,7 @@ DialogPlus {
buttonsAlignment: Qt.AlignRight
buttonsLeftMargin: 15
//: 'Start a video conference' : Title of a popup about creation of a video conference
title:qsTr('newConferenceTitle')
title: conferenceInfoModel.isNew ? qsTr('newConferenceTitle') : 'Changer la conférence'
height: window.height - 100
width: window.width - 100

View file

@ -19,7 +19,6 @@ import '../Conversation.js' as Logic
DialogPlus {
id:dialog
buttons: []
flat : true
//: 'Conversation's devices' : Title of window that show all devices
title: qsTr('conversationDevicesTitle')
showCloseCross:true

View file

@ -19,6 +19,9 @@ DialogPlus {
property bool _conferenceUriOk: true
property bool _videoConferenceUriOk: true
flat: true
showMargins: true
buttons: [
TextButtonA {
text: qsTr('cancel')

View file

@ -20,6 +20,8 @@ DialogPlus {
]
buttonsAlignment: Qt.AlignCenter
flat: true
showMargins: true
height: SettingsVideoPreviewStyle.height
width: SettingsVideoPreviewStyle.width
@ -34,44 +36,4 @@ DialogPlus {
showCloseButton: false
}
}
/*
Loader{
id: previewLoader
anchors.fill: parent
sourceComponent: Item{
anchors.fill: parent
Rectangle{
id: showArea
anchors.fill: parent
radius: 10
visible:false
color: 'red'
}
CameraPreview {
id: camera
anchors.fill: parent
onRequestNewRenderer: {previewLoader.active = false;previewLoader.active = true}
visible: false
}
OpacityMask{
anchors.fill: parent
source: camera
maskSource: showArea
transform: Matrix4x4 {// 180 rotation + mirror
matrix: Qt.matrix4x4(-Math.cos(Math.PI), -Math.sin(Math.PI), 0, 0,
Math.sin(Math.PI), Math.cos(Math.PI), 0, camera.height,
0, 0, 1, 0,
0, 0, 0, 1)
}
}
}
active: true
onActiveChanged: {
console.log("Active changed : " +active)
if(!active) active = true
}
}*/
}

View file

@ -12,7 +12,6 @@ singleton CallsWindowStyle 1.0 Calls/CallsWindowSt
singleton WaitingRoomStyle 1.0 Calls/WaitingRoomStyle.qml
singleton ConferenceStyle 1.0 Calls/ConferenceStyle.qml
singleton VideoConferenceStyle 1.0 Calls/VideoConferenceStyle.qml
singleton VideoConferenceMenuStyle 1.0 Calls/VideoConferenceMenuStyle.qml
singleton CallSipAddressStyle 1.0 Calls/Dialogs/CallSipAddressStyle.qml
singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransferStyle.qml

@ -1 +1 @@
Subproject commit 438e41d95550c5fb9dc1bb7385cafcd323fd0698
Subproject commit 9c69668a42189b54530a83b9263cfa2ad4149cf9