diff --git a/src/api/newcallmodel.h b/src/api/newcallmodel.h index da82a839146e28b98fcdd8e88da6b07c34dbc37c..65138c493efd65d0ed72f7cf32707b0a97a30994 100644 --- a/src/api/newcallmodel.h +++ b/src/api/newcallmodel.h @@ -197,7 +197,7 @@ Q_SIGNALS: * Emitted when a call state changes * @param callId */ - void callStatusChanged(const std::string& callId) const; + void callStatusChanged(const std::string& callId, int code) const; /** * Emitted when a call starts * @param callId diff --git a/src/conversationmodel.cpp b/src/conversationmodel.cpp index 74573643867a876a7ba39e1938673841090424be..7609d1afe4c98de508e3fd0999a70837d035c6ae 100644 --- a/src/conversationmodel.cpp +++ b/src/conversationmodel.cpp @@ -208,7 +208,7 @@ public Q_SLOTS: * Listen from callmodel for calls status changed. * @param callId */ - void slotCallStatusChanged(const std::string& callId); + void slotCallStatusChanged(const std::string& callId, int code); /** * Listen from callmodel for writing "Call started" * @param callId @@ -1499,8 +1499,9 @@ ConversationModelPimpl::slotIncomingCall(const std::string& fromId, const std::s } void -ConversationModelPimpl::slotCallStatusChanged(const std::string& callId) +ConversationModelPimpl::slotCallStatusChanged(const std::string& callId, int code) { + Q_UNUSED(code) // Get conversation auto i = std::find_if( conversations.begin(), conversations.end(), diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index 537ecac05270d8f8150d9caead4bf34d199fd26c..cb9dc2b58c970182c19f5a59e9c32683b6036451 100644 --- a/src/newcallmodel.cpp +++ b/src/newcallmodel.cpp @@ -506,7 +506,6 @@ NewCallModelPimpl::slotIncomingCall(const std::string& accountId, const std::str void NewCallModelPimpl::slotCallStateChanged(const std::string& callId, const std::string& state, int code) { - Q_UNUSED(code) if (!linked.hasCall(callId)) return; auto status = call::to_status(state); @@ -514,7 +513,7 @@ NewCallModelPimpl::slotCallStateChanged(const std::string& callId, const std::st if (status == call::Status::ENDED && !call::isTerminating(call->status)) { call->status = call::Status::TERMINATING; - emit linked.callStatusChanged(callId); + emit linked.callStatusChanged(callId, code); } // proper state transition @@ -530,7 +529,7 @@ NewCallModelPimpl::slotCallStateChanged(const std::string& callId, const std::st call::to_string(previousStatus).c_str(), call::to_string(status).c_str()); // NOTE: signal emission order matters, always emit CallStatusChanged before CallEnded - emit linked.callStatusChanged(callId); + emit linked.callStatusChanged(callId, code); if (call->status == call::Status::ENDED) { emit linked.callEnded(callId);