mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 19:38:09 +00:00
- Remove blank page in callwindows.
- Add a wait step while connecting the call. - Rewrite CallModel::getStatus() for variable debugging. - Split status call handler in call list to manage core and call signals. This avoid to use call data before any set from callbacks (core cbs are before call cbs). - Destroy call notification when model is destroyed (fix blank notification). - Fix status enums in incall menu for camera activation.
This commit is contained in:
parent
40bd8cb66c
commit
2bc0d4bef4
24 changed files with 136 additions and 36 deletions
|
|
@ -14,7 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## 5.0.10 - undefined
|
||||
|
||||
### Fixed
|
||||
- Blank notification when declining incoming call.
|
||||
- Remove blank notification when declining incoming call.
|
||||
- Remove blank page when opening calls window and add a waiting step while connecting to call.
|
||||
- Camera activation issue based on call status.
|
||||
|
||||
## 5.0.9 - 2023-01-31
|
||||
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ Server url ikke konfigureret.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ Server URL ist nicht konfiguriert.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ Server URL not configured.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation>You are alone in this meeting</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation>The call is not ready. Please Wait…</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ URL del servidor no configurada.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ URL du serveur non configurée.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation>Vous êtes actuellement seul dans cette réunion</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1489,6 +1489,11 @@ A kiszolgáló URL-je nincs konfigurálva.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ URL del server non configurato.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1489,6 +1489,11 @@
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1509,6 +1509,11 @@ Nesukonfigūruotas serverio url.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ URL do servidor não configurado.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1509,6 +1509,11 @@
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1499,6 +1499,11 @@ Serverwebbadressen är inte konfigurerad.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1489,6 +1489,11 @@ Sunucu url'si yapılandırılmadı.</translation>
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1509,6 +1509,11 @@
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -1489,6 +1489,11 @@
|
|||
<extracomment>''You are alone in this conference' : Text in message banner when the user is the only participant.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>incallWaitConnectedMessage</source>
|
||||
<extracomment>'The call is not ready. Please Wait...' : Waiting message for starting a call.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IncallFullscreen</name>
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ CallModel::~CallModel () {
|
|||
}
|
||||
|
||||
void CallModel::removeCall(){
|
||||
emit statusChanged(getStatus());
|
||||
if(mCall){
|
||||
mCall->removeListener(mCallListener);
|
||||
mConferenceModel = nullptr;// Ordering deletion.
|
||||
|
|
@ -623,27 +622,32 @@ void CallModel::stopAutoAnswerTimer () const {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
CallModel::CallStatus CallModel::getStatus () const {
|
||||
CallModel::CallStatus status;
|
||||
if(mCall){
|
||||
switch (mCall->getState()) {
|
||||
case linphone::Call::State::Connected:
|
||||
case linphone::Call::State::StreamsRunning:
|
||||
return CallStatusConnected;
|
||||
status = CallStatusConnected;
|
||||
break;
|
||||
|
||||
case linphone::Call::State::End:
|
||||
case linphone::Call::State::Error:
|
||||
case linphone::Call::State::Referred:
|
||||
case linphone::Call::State::Released:
|
||||
return CallStatusEnded;
|
||||
status = CallStatusEnded;
|
||||
break;
|
||||
|
||||
case linphone::Call::State::Paused:
|
||||
case linphone::Call::State::PausedByRemote:
|
||||
case linphone::Call::State::Pausing:
|
||||
case linphone::Call::State::Resuming:
|
||||
return CallStatusPaused;
|
||||
status = CallStatusPaused;
|
||||
break;
|
||||
|
||||
case linphone::Call::State::Updating:
|
||||
case linphone::Call::State::UpdatedByRemote:
|
||||
return mPausedByRemote ? CallStatusPaused : CallStatusConnected;
|
||||
status = mPausedByRemote ? CallStatusPaused : CallStatusConnected;
|
||||
break;
|
||||
|
||||
case linphone::Call::State::EarlyUpdatedByRemote:
|
||||
case linphone::Call::State::EarlyUpdating:
|
||||
|
|
@ -654,12 +658,13 @@ CallModel::CallStatus CallModel::getStatus () const {
|
|||
case linphone::Call::State::OutgoingInit:
|
||||
case linphone::Call::State::OutgoingProgress:
|
||||
case linphone::Call::State::OutgoingRinging:
|
||||
break;
|
||||
default:{
|
||||
status = mCall->getDir() == linphone::Call::Dir::Incoming ? CallStatusIncoming : CallStatusOutgoing;
|
||||
}
|
||||
}
|
||||
|
||||
return mCall->getDir() == linphone::Call::Dir::Incoming ? CallStatusIncoming : CallStatusOutgoing;
|
||||
}else
|
||||
return CallStatusIdle;
|
||||
status = CallStatusIdle;
|
||||
return status;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -524,6 +524,7 @@ static void joinConference (const shared_ptr<linphone::Call> &call) {
|
|||
addModel->update();
|
||||
}
|
||||
|
||||
// Global handler on core (is call before call model receive it). Used for model creation.
|
||||
void CallsListModel::handleCallStateChanged (const shared_ptr<linphone::Call> &call, linphone::Call::State state) {
|
||||
switch (state) {
|
||||
case linphone::Call::State::IncomingReceived:
|
||||
|
|
@ -534,30 +535,39 @@ void CallsListModel::handleCallStateChanged (const shared_ptr<linphone::Call> &c
|
|||
case linphone::Call::State::OutgoingInit:
|
||||
addCall(call);
|
||||
break;
|
||||
|
||||
case linphone::Call::State::End:
|
||||
case linphone::Call::State::Error:{
|
||||
if(call->dataExists("call-model")) {
|
||||
CallModel * model = &call->getData<CallModel>("call-model");
|
||||
model->endCall();
|
||||
if(model->getCallError() == "")
|
||||
removeCall(call);
|
||||
}
|
||||
} break;
|
||||
case linphone::Call::State::Released:
|
||||
removeCall(call);
|
||||
break;
|
||||
|
||||
case linphone::Call::State::StreamsRunning: {
|
||||
int index = findCallIndex(mList, call);
|
||||
emit callRunning(index, &call->getData<CallModel>("call-model"));
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Call handler
|
||||
void CallsListModel::handleCallStatusChanged () {
|
||||
auto callModel = qobject_cast<CallModel*>(sender());
|
||||
auto call = callModel->getCall();
|
||||
if( call){
|
||||
auto state = call->getState();
|
||||
switch (state) {
|
||||
case linphone::Call::State::End:
|
||||
case linphone::Call::State::Error:{
|
||||
callModel->endCall();
|
||||
if(callModel->getCallError() == "")
|
||||
removeCall(call);
|
||||
} break;
|
||||
case linphone::Call::State::Released:
|
||||
removeCall(call);
|
||||
break;
|
||||
|
||||
case linphone::Call::State::StreamsRunning: {
|
||||
int index = findCallIndex(mList, call);
|
||||
emit callRunning(index, callModel);
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void CallsListModel::addCall (const shared_ptr<linphone::Call> &call) {
|
||||
|
|
@ -568,6 +578,7 @@ void CallsListModel::addCall (const shared_ptr<linphone::Call> &call) {
|
|||
App::getInstance()->getEngine()->setObjectOwnership(callModel.get(), QQmlEngine::CppOwnership);
|
||||
|
||||
connect(callModel.get(), &CallModel::meAdminChanged, this, &CallsListModel::canMergeCallsChanged);
|
||||
connect(callModel.get(), &CallModel::statusChanged, this, &CallsListModel::handleCallStatusChanged);
|
||||
|
||||
add(callModel);
|
||||
emit layoutChanged();
|
||||
|
|
@ -602,6 +613,7 @@ void CallsListModel::addDummyCall () {
|
|||
emit dataChanged(index(id, 0), index(id, 0));
|
||||
});
|
||||
connect(callModel.get(), &CallModel::meAdminChanged, this, &CallsListModel::canMergeCallsChanged);
|
||||
connect(callModel.get(), &CallModel::statusChanged, this, &CallsListModel::handleCallStatusChanged);
|
||||
|
||||
add(callModel);
|
||||
emit layoutChanged();
|
||||
|
|
@ -618,7 +630,6 @@ void CallsListModel::removeCall (const shared_ptr<linphone::Call> &call) {
|
|||
removeCallCb(callModel);
|
||||
});
|
||||
}else{
|
||||
callModel->removeCall();
|
||||
remove(callModel);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ public:
|
|||
Q_INVOKABLE void terminateCall (const QString& sipAddress) const;
|
||||
|
||||
static std::list<std::shared_ptr<linphone::CallLog>> getCallHistory(const QString& peerAddress, const QString& localAddress);
|
||||
|
||||
void handleCallStatusChanged ();
|
||||
|
||||
signals:
|
||||
void callRunning (int index, CallModel *callModel);
|
||||
|
|
|
|||
|
|
@ -328,6 +328,9 @@ void Notifier::notifyReceivedCall (const shared_ptr<linphone::Call> &call) {
|
|||
if (status == CallModel::CallStatusEnded || status == CallModel::CallStatusConnected)
|
||||
deleteNotification(QVariant::fromValue(notification));
|
||||
});
|
||||
QObject::connect(callModel, &CallModel::destroyed, notification, [this, notification]() {
|
||||
deleteNotification(QVariant::fromValue(notification));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Rectangle{
|
|||
property bool _activateCamera: false
|
||||
Connections{// Enable camera only when status is ok
|
||||
target: mainItem.callModel
|
||||
onStatusChanged: if( mainItem._activateCamera && (status == LinphoneEnums.CallStatusConnected || status == LinphoneEnums.CallStatusIdle)){
|
||||
onStatusChanged: if( mainItem._activateCamera && (status == CallModel.CallStatusConnected || status == CallModel.CallStatusIdle)){
|
||||
camera._activateCamera = false
|
||||
callModel.cameraEnabled = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ function getContent (call, conferenceInfoModel) {
|
|||
}
|
||||
var CallModel = Linphone.CallModel
|
||||
if (status === CallModel.CallStatusIncoming) {
|
||||
return null;
|
||||
return incall;
|
||||
}
|
||||
if( window.conferenceInfoModel != call.conferenceInfoModel) {
|
||||
Qt.callLater(function(){window.conferenceInfoModel = call.conferenceInfoModel})
|
||||
|
|
|
|||
|
|
@ -282,7 +282,6 @@ Window {
|
|||
window.close()
|
||||
lastComponent = sourceComponent
|
||||
}
|
||||
|
||||
}// Force update when loading a new Content. It's just to be sure
|
||||
active: window.call || window.conferenceInfoModel
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Rectangle {
|
|||
|
||||
// States
|
||||
property bool isAudioOnly: callModel && callModel.conferenceVideoLayout == LinphoneEnums.ConferenceLayoutAudioOnly
|
||||
property bool isReady : mainItem.callModel
|
||||
property bool isReady : mainItem.callModel && mainItem.callModel.status != CallModel.CallStatusIdle
|
||||
&& (!mainItem.callModel.isConference
|
||||
|| (mainItem.conferenceModel && mainItem.conferenceModel.isReady)
|
||||
)
|
||||
|
|
@ -399,8 +399,11 @@ Rectangle {
|
|||
text: false //mainItem.needMoreParticipants
|
||||
//: 'Waiting for another participant...' : Waiting message for more participant.
|
||||
? qsTr('incallWaitParticipantMessage')
|
||||
: mainItem.callModel && mainItem.callModel.isConference
|
||||
//: 'The meeting is not ready. Please Wait...' : Waiting message for starting a meeting.
|
||||
: qsTr('incallWaitMessage')
|
||||
? qsTr('incallWaitMessage')
|
||||
//: 'The call is not ready. Please Wait...' : Waiting message for starting a call.
|
||||
: qsTr('incallWaitConnectedMessage')
|
||||
color: IncallStyle.buzyColor.color
|
||||
}
|
||||
}
|
||||
|
|
@ -552,7 +555,7 @@ Rectangle {
|
|||
}
|
||||
Connections{// Enable camera only when status is ok
|
||||
target: callModel
|
||||
onStatusChanged: if( camera._activateCamera && (status == LinphoneEnums.CallStatusConnected || status == LinphoneEnums.CallStatusIdle)){
|
||||
onStatusChanged: if( camera._activateCamera && (status == CallModel.CallStatusConnected || status == CallModel.CallStatusIdle)){
|
||||
camera._activateCamera = false
|
||||
callModel.cameraEnabled = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue