mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 06:38:07 +00:00
feat(src/components/calls/CallsListModel): remove getCallModel function
This commit is contained in:
parent
7eb331dd4c
commit
4033a92891
3 changed files with 1 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue