mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
fix #LINQT-2108 : do not use <= or >= in lessThan comparator (c++ restriction)
This commit is contained in:
parent
99c2a6ddc6
commit
6f4e925766
3 changed files with 3 additions and 3 deletions
|
|
@ -83,6 +83,6 @@ bool ChatProxy::SortFilterList::lessThan(const QModelIndex &sourceLeft, const QM
|
|||
if (!mFilterText.isEmpty()) return false;
|
||||
auto l = getItemAtSource<ChatList, ChatCore>(sourceLeft.row());
|
||||
auto r = getItemAtSource<ChatList, ChatCore>(sourceRight.row());
|
||||
if (l && r) return l->getLastUpdatedTime() >= r->getLastUpdatedTime();
|
||||
if (l && r) return l->getLastUpdatedTime() > r->getLastUpdatedTime();
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,6 +152,6 @@ bool EventLogProxy::SortFilterList::filterAcceptsRow(int sourceRow, const QModel
|
|||
bool EventLogProxy::SortFilterList::lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const {
|
||||
auto l = getItemAtSource<EventLogList, EventLogCore>(sourceLeft.row());
|
||||
auto r = getItemAtSource<EventLogList, EventLogCore>(sourceRight.row());
|
||||
if (l && r) return l->getTimestamp() <= r->getTimestamp();
|
||||
if (l && r) return l->getTimestamp() < r->getTimestamp();
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ bool ConferenceInfoProxy::SortFilterList::lessThan(const QModelIndex &sourceLeft
|
|||
auto nowDate = QDate::currentDate();
|
||||
if (!l || !r) { // sort on date
|
||||
auto rdate = r ? r->getDateTimeUtc().date() : QDate::currentDate();
|
||||
return !l ? nowDate <= r->getDateTimeUtc().date() : l->getDateTimeUtc().date() < nowDate;
|
||||
return !l ? nowDate < r->getDateTimeUtc().date() : l->getDateTimeUtc().date() < nowDate;
|
||||
} else {
|
||||
return l->getDateTimeUtc() < r->getDateTimeUtc();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue