From d4d07ff7ab877ec5adec53c216f0fc1504749f65 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Mon, 27 Jun 2022 17:10:51 +0200 Subject: [PATCH] Fix conference list crash on Windows --- .../conferenceInfo/ConferenceInfoProxyListModel.cpp | 6 ++++-- .../components/conferenceInfo/ConferenceInfoProxyModel.cpp | 4 ---- .../components/conferenceInfo/ConferenceInfoProxyModel.hpp | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp index 9c28f3298..a0e6609ed 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp @@ -59,5 +59,7 @@ bool ConferenceInfoProxyListModel::filterAcceptsRow (int sourceRow, const QModel } bool ConferenceInfoProxyListModel::lessThan (const QModelIndex &left, const QModelIndex &right) const { - return true; -} \ No newline at end of file + const ConferenceInfoModel* a = sourceModel()->data(left).value(); + const ConferenceInfoModel* b = sourceModel()->data(right).value(); + return a->getDateTimeUtc() < b->getDateTimeUtc(); +} diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp index d023fb0d0..ee53d1180 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp @@ -61,7 +61,3 @@ bool ConferenceInfoProxyModel::filterAcceptsRow (int sourceRow, const QModelInde } return false; } - -bool ConferenceInfoProxyModel::lessThan (const QModelIndex &left, const QModelIndex &right) const { - return true; -} \ No newline at end of file diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.hpp index 4072a2a9b..da0b5a969 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.hpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.hpp @@ -52,7 +52,6 @@ public: protected: bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override; - bool lessThan (const QModelIndex &left, const QModelIndex &right) const override; private: