Commit 150063f6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make compile without deprecated methods

parent 849eee54
Pipeline #181344 passed with stage
in 8 minutes and 33 seconds
......@@ -6,6 +6,7 @@
#include "calendaring.h"
#include "pimkolab_debug.h"
#include <kcalcore_version.h>
#include <KCalendarCore/Todo>
#include <QDate>
......@@ -88,7 +89,11 @@ std::vector<Kolab::Event> Calendar::getEvents(const Kolab::cDateTime &start, con
const QTimeZone tz = s.timeZone();
KCalendarCore::Event::List list = mCalendar->events(s.date(), e.date(), tz, true);
if (sort) {
#if KCALCORE_VERSION < QT_VERSION_CHECK(5, 95, 0)
list = mCalendar->sortEvents(list, KCalendarCore::EventSortStartDate, KCalendarCore::SortDirectionAscending);
#else
list = mCalendar->sortEvents(std::move(list), KCalendarCore::EventSortStartDate, KCalendarCore::SortDirectionAscending);
#endif
}
std::vector<Kolab::Event> eventlist;
for (const KCalendarCore::Event::Ptr &event : std::as_const(list)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment