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

This commit is contained in:
Ronan Abhamon 2017-05-22 11:19:17 +02:00
parent 7eb331dd4c
commit 4033a92891
3 changed files with 1 additions and 8 deletions

View file

@ -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 {

View file

@ -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;

View file

@ -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) {