Skip to content
Snippets Groups Projects
Commit 70c520e8 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

pendingConferenceesListModel: avoid invalid connections

Change-Id: I9d073cb5203a887fd5e39ced258b19e0196d069b
parent 7084f6dd
No related branches found
No related tags found
No related merge requests found
......@@ -125,17 +125,18 @@ PendingConferenceesListModel::connectSignals()
disconnect(beginRemovePendingConferencesRows_);
disconnect(endRemovePendingConferencesRows_);
auto currentCallModel = lrcInstance_->getCurrentCallModel();
if (!currentCallModel)
return;
using namespace PendingConferences;
callsStatusChanged_ = connect(lrcInstance_->getCurrentCallModel(),
&NewCallModel::callStatusChanged,
[this](const QString&, int) {
Q_EMIT dataChanged(index(0, 0),
index(rowCount() - 1),
{Role::CallStatus});
});
callsStatusChanged_
= connect(currentCallModel, &NewCallModel::callStatusChanged, [this](const QString&, int) {
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1), {Role::CallStatus});
});
beginInsertPendingConferencesRows_ = connect(
lrcInstance_->getCurrentCallModel(),
currentCallModel,
&NewCallModel::beginInsertPendingConferenceesRows,
this,
[this](int position, int rows) {
......@@ -144,14 +145,14 @@ PendingConferenceesListModel::connectSignals()
Qt::DirectConnection);
endInsertPendingConferencesRows_ = connect(
lrcInstance_->getCurrentCallModel(),
currentCallModel,
&NewCallModel::endInsertPendingConferenceesRows,
this,
[this]() { endInsertRows(); },
Qt::DirectConnection);
beginRemovePendingConferencesRows_ = connect(
lrcInstance_->getCurrentCallModel(),
currentCallModel,
&NewCallModel::beginRemovePendingConferenceesRows,
this,
[this](int position, int rows) {
......@@ -160,7 +161,7 @@ PendingConferenceesListModel::connectSignals()
Qt::DirectConnection);
endRemovePendingConferencesRows_ = connect(
lrcInstance_->getCurrentCallModel(),
currentCallModel,
&NewCallModel::endRemovePendingConferenceesRows,
this,
[this]() { endRemoveRows(); },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment