diff --git a/Linphone/core/participant/ParticipantCore.cpp b/Linphone/core/participant/ParticipantCore.cpp index e08c67791..8ba57b6f3 100644 --- a/Linphone/core/participant/ParticipantCore.cpp +++ b/Linphone/core/participant/ParticipantCore.cpp @@ -39,9 +39,10 @@ QSharedPointer ParticipantCore::create(const std::shared_ptr
  • &participant) : QObject(nullptr) { - mustBeInLinphoneThread(getClassName()); + if (participant) mustBeInLinphoneThread(getClassName()); App::getInstance()->mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership); mParticipantModel = Utils::makeQObject_ptr(participant); + mParticipantModel->moveToThread(CoreModel::getInstance()->thread()); if (participant) { mAdminStatus = participant->isAdmin(); mSipAddress = Utils::coreStringToAppString(participant->getAddress()->asStringUriOnly()); diff --git a/Linphone/core/participant/ParticipantList.cpp b/Linphone/core/participant/ParticipantList.cpp index 14b27b921..007983186 100644 --- a/Linphone/core/participant/ParticipantList.cpp +++ b/Linphone/core/participant/ParticipantList.cpp @@ -137,11 +137,14 @@ std::list> ParticipantList::getParticipants() } bool ParticipantList::contains(const QString &address) const { - auto testAddress = ToolModel::interpretUrl(address); bool exists = false; - for (auto itParticipant = mList.begin(); !exists && itParticipant != mList.end(); ++itParticipant) - exists = testAddress->weakEqual( - ToolModel::interpretUrl(itParticipant->objectCast()->getSipAddress())); + App::postModelBlock([this, address, &exists, participants = mList]() { + auto testAddress = ToolModel::interpretUrl(address); + for (auto itParticipant = participants.begin(); !exists && itParticipant != participants.end(); ++itParticipant) + exists = testAddress->weakEqual( + ToolModel::interpretUrl(itParticipant->objectCast()->getSipAddress())); + }); + return exists; } @@ -184,4 +187,4 @@ void ParticipantList::addAddress(const QString &address) { emit participant->lStartInvitation(); emit countChanged(); } -} \ No newline at end of file +} diff --git a/Linphone/model/participant/ParticipantModel.cpp b/Linphone/model/participant/ParticipantModel.cpp index e5c068f25..9a7e77d5e 100644 --- a/Linphone/model/participant/ParticipantModel.cpp +++ b/Linphone/model/participant/ParticipantModel.cpp @@ -28,6 +28,7 @@ DEFINE_ABSTRACT_OBJECT(ParticipantModel) ParticipantModel::ParticipantModel(std::shared_ptr linphoneParticipant, QObject *parent) : QObject(parent) { + if (linphoneParticipant) mustBeInLinphoneThread(getClassName()); mParticipant = linphoneParticipant; } @@ -61,4 +62,4 @@ bool ParticipantModel::getAdminStatus() const { bool ParticipantModel::isFocus() const { return mParticipant->isFocus(); -} \ No newline at end of file +} diff --git a/Linphone/view/App/CallsWindow.qml b/Linphone/view/App/CallsWindow.qml index 29f6cab21..de4926f45 100644 --- a/Linphone/view/App/CallsWindow.qml +++ b/Linphone/view/App/CallsWindow.qml @@ -732,11 +732,11 @@ Window { Connections { target: rightPanel // TODO : chercher comment relier ces infos pour faire le add des participants - onValidateRequested: { - participantList.model.addAddresses(participantsStack.selectedParticipants) - participantsStack.pop() - participantsStack.participantAdded() - } + //onValidateRequested: { + // participantList.model.addAddresses(participantsStack.selectedParticipants) + // participantsStack.pop() + // participantsStack.participantAdded() + //} } } } diff --git a/Linphone/view/Item/Call/WaitingRoom.qml b/Linphone/view/Item/Call/WaitingRoom.qml index 17e9db995..3f99d08fb 100644 --- a/Linphone/view/Item/Call/WaitingRoom.qml +++ b/Linphone/view/Item/Call/WaitingRoom.qml @@ -93,10 +93,11 @@ RowLayout { ColumnLayout { spacing: 93 * DefaultStyle.dp ColumnLayout { - spacing: 5 * DefaultStyle.dp + Layout.topMargin: 54 * DefaultStyle.dp + spacing: 0 Text { Layout.fillWidth: true - text: qsTr("Participer à :\n") + text: qsTr("Participer à :") color: DefaultStyle.grey_0 font { pixelSize: 30 * DefaultStyle.dp diff --git a/Linphone/view/Item/Contact/Sticker.qml b/Linphone/view/Item/Contact/Sticker.qml index 0452a69a8..df6b5a757 100644 --- a/Linphone/view/Item/Contact/Sticker.qml +++ b/Linphone/view/Item/Contact/Sticker.qml @@ -52,15 +52,52 @@ Item { anchors.fill: parent spacing: 0 visible: !cameraLoader.active || cameraLoader.status != Loader.Ready || !cameraLoader.item.isReady - Avatar{ - id: avatar + Item{ Layout.alignment: Qt.AlignHCenter // minSize = 372 => avatar = 142 Layout.preferredHeight: background.minSize * 142 / 372 Layout.preferredWidth: height - account: mainItem.account - call: !mainItem.previewEnabled ? mainItem.call : null - address: mainItem.peerAddress + Avatar{ + id: avatar + anchors.fill: parent + visible: !joiningView.visible + account: mainItem.account + call: !mainItem.previewEnabled ? mainItem.call : null + address: mainItem.peerAddress + } + ColumnLayout{ + id: joiningView + anchors.fill: parent + spacing: 0 + visible: mainItem.participantDevice && (mainItem.participantDevice.core.state == LinphoneEnums.ParticipantDeviceState.Joining || mainItem.participantDevice.core.state == LinphoneEnums.ParticipantDeviceState.Alerting) || false + Item{ + Layout.fillHeight: true + Layout.fillWidth: true + } + BusyIndicator { + Layout.preferredHeight: 27 * DefaultStyle.dp + indicatorColor: DefaultStyle.main2_100 + Layout.alignment: Qt.AlignHCenter + indicatorHeight: 42 * DefaultStyle.dp + indicatorWidth: 42 * DefaultStyle.dp + } + Text { + Layout.preferredHeight: 27 * DefaultStyle.dp + Layout.topMargin: 15 * DefaultStyle.dp // (84-27)-42 + text: qsTr('rejoint...') + color: DefaultStyle.grey_0 + Layout.alignment: Qt.AlignHCenter + horizontalAlignment: Text.AlignHCenter + font { + pixelSize: 20 * DefaultStyle.dp + weight: 500 * DefaultStyle.dp + } + } + Item{ + Layout.fillHeight: true + Layout.fillWidth: true + } + } } Text { Layout.fillWidth: true diff --git a/Linphone/view/Layout/Meeting/AddParticipantsLayout.qml b/Linphone/view/Layout/Meeting/AddParticipantsLayout.qml index b185e9ae7..ac2589e15 100644 --- a/Linphone/view/Layout/Meeting/AddParticipantsLayout.qml +++ b/Linphone/view/Layout/Meeting/AddParticipantsLayout.qml @@ -16,7 +16,8 @@ ColumnLayout { readonly property string groupName: groupCallName.text function clearSelectedParticipants() { - contactList.selectedContacts.clear() + // TODO + //contactList.selectedContacts.clear() } ColumnLayout { @@ -155,4 +156,4 @@ ColumnLayout { Item { Layout.fillHeight: true } -} \ No newline at end of file +}