Commit 4033a928 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/components/calls/CallsListModel): remove `getCallModel` function

parent 7eb331dd
......@@ -80,11 +80,6 @@ QVariant CallsListModel::data (const QModelIndex &index, int role) const {
return QVariant();
}
CallModel *CallsListModel::getCallModel (const shared_ptr<linphone::Call> &call) const {
auto it = findCallModel(*(const_cast<QList<CallModel *> *>(&mList)), call);
return it != mList.end() ? *it : nullptr;
}
// -----------------------------------------------------------------------------
void CallsListModel::launchAudioCall (const QString &sipUri) const {
......
......@@ -43,8 +43,6 @@ public:
QHash<int, QByteArray> roleNames () const override;
QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const override;
CallModel *getCallModel (const std::shared_ptr<linphone::Call> &call) const;
Q_INVOKABLE void launchAudioCall (const QString &sipUri) const;
Q_INVOKABLE void launchVideoCall (const QString &sipUri) const;
......
......@@ -256,7 +256,7 @@ void Notifier::notifyReceivedCall (const shared_ptr<linphone::Call> &call) {
if (!notification)
return;
CallModel *callModel = CoreManager::getInstance()->getCallsListModel()->getCallModel(call);
CallModel *callModel = &call->getData<CallModel>("call-model");
QObject::connect(
callModel, &CallModel::statusChanged, notification, [this, notification](CallModel::CallStatus status) {
......
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