Commit fda5d88b authored by Albert  Babí Oller's avatar Albert Babí Oller Committed by Sébastien Blin

conversationmodel: avoid dual signal for incoming calls

Change-Id: Id64726b73f18150b97e42ad8bcc9f590e4857c80
parent fb43e4ac
......@@ -127,11 +127,11 @@ Q_SIGNALS:
*/
void contactRemoved(const QString& contactUri) const;
/**
* Connect this signal to know when an incoming call comes from a pending contact.
* Connect this signal to know when a call is incoming.
* @param fromId peer profile uri
* @param callId incoming call id
*/
void incomingCallFromPending(const QString& from, const QString& callId) const;
void incomingCall(const QString& from, const QString& callId) const;
/**
* Connect this signal to know when a text message arrives for this account
* @param accountId
......
......@@ -918,7 +918,7 @@ ContactModelPimpl::slotIncomingCall(const QString& fromId, const QString& callId
}
}
emit linked.incomingCallFromPending(fromId, callId);
emit linked.incomingCall(fromId, callId);
}
void
......
......@@ -1273,9 +1273,7 @@ ConversationModelPimpl::ConversationModelPimpl(const ConversationModel& linked,
this, &ConversationModelPimpl::slotUpdateInteractionStatus);
// Call related
connect(&*linked.owner.callModel, &NewCallModel::newIncomingCall,
this, &ConversationModelPimpl::slotIncomingCall);
connect(&*linked.owner.contactModel, &ContactModel::incomingCallFromPending,
connect(&*linked.owner.contactModel, &ContactModel::incomingCall,
this, &ConversationModelPimpl::slotIncomingCall);
connect(&*linked.owner.callModel,
&lrc::api::NewCallModel::callStatusChanged,
......@@ -1361,9 +1359,7 @@ ConversationModelPimpl::~ConversationModelPimpl()
this, &ConversationModelPimpl::slotUpdateInteractionStatus);
// Call related
disconnect(&*linked.owner.callModel, &NewCallModel::newIncomingCall,
this, &ConversationModelPimpl::slotIncomingCall);
disconnect(&*linked.owner.contactModel, &ContactModel::incomingCallFromPending,
disconnect(&*linked.owner.contactModel, &ContactModel::incomingCall,
this, &ConversationModelPimpl::slotIncomingCall);
disconnect(&*linked.owner.callModel, &lrc::api::NewCallModel::callStatusChanged,
this, &ConversationModelPimpl::slotCallStatusChanged);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment