diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index a9e5f082a..927c0bb67 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -878,12 +878,12 @@ void CallModel::searchReceived(std::list } } -void CallModel::callEnded(){ +void CallModel::endCall(){ if(mCall){ ChatRoomModel * model = getChatRoomModel(); if(model){ - model->callEnded(mCall); + model->onCallEnded(mCall); }else{// No chat rooms have been associated for this call. Search one in current chat room list shared_ptr core = CoreManager::getInstance()->getCore(); std::shared_ptr params = core->createDefaultChatRoomParams(); @@ -894,7 +894,7 @@ void CallModel::callEnded(){ , participants); QSharedPointer chatRoomModel= CoreManager::getInstance()->getTimelineListModel()->getChatRoomModel(chatRoom, false); if(chatRoomModel) - chatRoomModel->callEnded(mCall); + chatRoomModel->onCallEnded(mCall); } } } diff --git a/linphone-app/src/components/call/CallModel.hpp b/linphone-app/src/components/call/CallModel.hpp index d4aa0b00e..df8c80150 100644 --- a/linphone-app/src/components/call/CallModel.hpp +++ b/linphone-app/src/components/call/CallModel.hpp @@ -188,7 +188,7 @@ public: public slots: // Set remote display name when a search has been done void searchReceived(std::list> results); - void callEnded(); + void endCall(); signals: void callErrorChanged (const QString &callError); @@ -215,7 +215,6 @@ signals: void transferAddressChanged (const QString &transferAddress); void conferenceVideoLayoutChanged(); - public: void handleCallEncryptionChanged (const std::shared_ptr &call); diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp index aa67a58a1..d2dd39ee1 100644 --- a/linphone-app/src/components/calls/CallsListModel.cpp +++ b/linphone-app/src/components/calls/CallsListModel.cpp @@ -450,7 +450,7 @@ void CallsListModel::handleCallStateChanged (const shared_ptr &c case linphone::Call::State::Error:{ if(call->dataExists("call-model")) { CallModel * model = &call->getData("call-model"); - model->callEnded(); + model->endCall(); } removeCall(call); } break; @@ -519,9 +519,13 @@ void CallsListModel::removeCall (const shared_ptr &call) { qWarning() << QStringLiteral("Unable to find call:") << call.get(); return; } - - QTimer::singleShot(DelayBeforeRemoveCall, this, [this, callModel] { - removeCallCb(callModel); + QTimer::singleShot( DelayBeforeRemoveCall , this, [this, callModel] { + if( callModel->getCallError() != ""){// We got an error, met more time to see it. + QTimer::singleShot( DelayBeforeRemoveCall , this, [this, callModel] { + removeCallCb(callModel); + }); + }else + removeCallCb(callModel); }); } diff --git a/linphone-app/src/components/camera/Camera.cpp b/linphone-app/src/components/camera/Camera.cpp index 792664e3c..f4369b510 100644 --- a/linphone-app/src/components/camera/Camera.cpp +++ b/linphone-app/src/components/camera/Camera.cpp @@ -197,7 +197,7 @@ QQuickFramebufferObject::Renderer *Camera::createRenderer () const { }else{ mIsWindowIdSet = true; qDebug() << "[Camera] Added " << renderer << " at " << mWindowIdLocation << " for " << this; - QTimer::singleShot(1, this, &Camera::isReady);// Workaround for const createRenderer + QTimer::singleShot(1, this, &Camera::isReady);// Workaround for const createRenderer. } return renderer; } diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.cpp b/linphone-app/src/components/chat-room/ChatRoomModel.cpp index bea32c713..d4de3ce01 100644 --- a/linphone-app/src/components/chat-room/ChatRoomModel.cpp +++ b/linphone-app/src/components/chat-room/ChatRoomModel.cpp @@ -989,7 +989,7 @@ int ChatRoomModel::loadMoreEntries(){ //------------------------------------------------- //------------------------------------------------- -void ChatRoomModel::callEnded(std::shared_ptr call){ +void ChatRoomModel::onCallEnded(std::shared_ptr call){ if( call->getCallLog()->getStatus() == linphone::Call::Status::Missed) addMissedCallsCount(call); else{ diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.hpp b/linphone-app/src/components/chat-room/ChatRoomModel.hpp index abb884cb9..fe49d6518 100644 --- a/linphone-app/src/components/chat-room/ChatRoomModel.hpp +++ b/linphone-app/src/components/chat-room/ChatRoomModel.hpp @@ -170,7 +170,7 @@ public: Q_INVOKABLE void resetMessageCount (); void initEntries(); Q_INVOKABLE int loadMoreEntries(); // return new entries count - void callEnded(std::shared_ptr call); + void onCallEnded(std::shared_ptr call); void updateNewMessageNotice(const int& count); Q_INVOKABLE int loadTillMessage(ChatMessageModel * message);// Load all entries till message and return its index. -1 if not found. static bool isTerminated(const std::shared_ptr& chatRoom);