Skip to content
Snippets Groups Projects
Commit af8f2826 authored by Olivier SOLDANO's avatar Olivier SOLDANO Committed by Anthony Léonard
Browse files

force display of all incoming calls invites


whenever the user receives a call (even when in another call)
display the incoming call invite page.
The previous comportment was to stay on the active page.

Change-Id: I6986f5eb36981d1b329652bf2acadf500e2c0202
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent ee351810
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,16 @@ CallWidget::CallWidget(QWidget* parent) : ...@@ -128,6 +128,16 @@ CallWidget::CallWidget(QWidget* parent) :
this, this,
SLOT(smartListCurrentChanged(QModelIndex,QModelIndex))); SLOT(smartListCurrentChanged(QModelIndex,QModelIndex)));
connect(&RecentModel::instance(), &QAbstractItemModel::dataChanged, [=](const QModelIndex &topLeft, const QModelIndex &bottomRight,const QVector<int> &vec){
Q_UNUSED(bottomRight)
Q_UNUSED(vec)
auto realIdx = RecentModel::instance().peopleProxy()->mapFromSource(topLeft);
if (realIdx.isValid() && RecentModel::instance().hasActiveCall(realIdx)){
ui->smartList->selectionModel()->setCurrentIndex(realIdx,QItemSelectionModel::ClearAndSelect);
}
});
connect(RecentModel::instance().selectionModel(), &QItemSelectionModel::selectionChanged, [=](const QItemSelection &selected, const QItemSelection &deselected) { connect(RecentModel::instance().selectionModel(), &QItemSelectionModel::selectionChanged, [=](const QItemSelection &selected, const QItemSelection &deselected) {
// lambda used to focus on the correct smartList element when switching automatically between two calls // lambda used to focus on the correct smartList element when switching automatically between two calls
Q_UNUSED(deselected) Q_UNUSED(deselected)
...@@ -142,15 +152,6 @@ CallWidget::CallWidget(QWidget* parent) : ...@@ -142,15 +152,6 @@ CallWidget::CallWidget(QWidget* parent) :
} }
}); });
connect(&RecentModel::instance(), &QAbstractItemModel::dataChanged, [=](const QModelIndex &topLeft, const QModelIndex &bottomRight,const QVector<int> &vec){
Q_UNUSED(bottomRight)
Q_UNUSED(vec)
auto realIdx = RecentModel::instance().peopleProxy()->mapFromSource(topLeft);
if (realIdx.isValid() && RecentModel::instance().hasActiveCall(realIdx)){
ui->smartList->selectionModel()->setCurrentIndex(realIdx,QItemSelectionModel::ClearAndSelect);
}
});
connect(&NameDirectory::instance(), SIGNAL(registeredNameFound(Account*,NameDirectory::LookupStatus,const QString&,const QString&)), connect(&NameDirectory::instance(), SIGNAL(registeredNameFound(Account*,NameDirectory::LookupStatus,const QString&,const QString&)),
this, SLOT(contactLineEdit_registeredNameFound(Account*,NameDirectory::LookupStatus,const QString&,const QString&))); this, SLOT(contactLineEdit_registeredNameFound(Account*,NameDirectory::LookupStatus,const QString&,const QString&)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment