mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
fix(src/components/call/CallModel): do not set data model twice
This commit is contained in:
parent
a19d292bf5
commit
7c92738cd7
3 changed files with 5 additions and 3 deletions
|
|
@ -108,6 +108,10 @@ CallModel::CallModel (shared_ptr<linphone::Call> linphoneCall) {
|
|||
);
|
||||
}
|
||||
|
||||
CallModel::~CallModel () {
|
||||
mLinphoneCall->unsetData("call-model");
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void CallModel::setRecordFile (shared_ptr<linphone::CallParams> &callParams) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public:
|
|||
Q_ENUM(CallStatus);
|
||||
|
||||
CallModel (std::shared_ptr<linphone::Call> linphoneCall);
|
||||
~CallModel () = default;
|
||||
~CallModel ();
|
||||
|
||||
std::shared_ptr<linphone::Call> getLinphoneCall () const {
|
||||
return mLinphoneCall;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@ void CallsListModel::addCall (const shared_ptr<linphone::Call> &linphoneCall) {
|
|||
qInfo() << "Add call:" << call;
|
||||
|
||||
App::getInstance()->getEngine()->setObjectOwnership(call, QQmlEngine::CppOwnership);
|
||||
linphoneCall->setData("call-model", *call);
|
||||
|
||||
int row = mList.count();
|
||||
|
||||
|
|
@ -193,7 +192,6 @@ void CallsListModel::removeCall (const shared_ptr<linphone::Call> &linphoneCall)
|
|||
QTimer::singleShot(
|
||||
DELAY_BEFORE_REMOVE_CALL, this, [this, linphoneCall]() {
|
||||
CallModel *call = &linphoneCall->getData<CallModel>("call-model");
|
||||
linphoneCall->unsetData("call-model");
|
||||
|
||||
qInfo() << "Removing call:" << call;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue