mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 10:29:24 +00:00
Fix crash on participant list.
This commit is contained in:
parent
33da261c08
commit
16851bdcc2
1 changed files with 7 additions and 5 deletions
|
|
@ -208,9 +208,11 @@ bool ParticipantProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex &
|
|||
}
|
||||
}
|
||||
|
||||
bool ParticipantProxyModel::lessThan (const QModelIndex &left, const QModelIndex &right) const {
|
||||
const ParticipantModel* a = sourceModel()->data(left).value<ParticipantModel*>();
|
||||
const ParticipantModel* b = sourceModel()->data(right).value<ParticipantModel*>();
|
||||
|
||||
return a->getCreationTime() > b->getCreationTime() || b->isMe();
|
||||
bool ParticipantProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
||||
const ParticipantModel *a = sourceModel()->data(left).value<ParticipantModel *>();
|
||||
const ParticipantModel *b = sourceModel()->data(right).value<ParticipantModel *>();
|
||||
bool bIsRecent = a->getCreationTime() < b->getCreationTime();
|
||||
bool aIsMe = a->isMe();
|
||||
bool bIsMe = b->isMe();
|
||||
return bIsMe || (bIsRecent && !aIsMe);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue