Commit 548ffe17 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated methods

parent 316b1ebf
Pipeline #181342 passed with stage
in 2 minutes and 10 seconds
......@@ -8,6 +8,8 @@
#include "whatsnextview.h"
#include <kcalcore_version.h>
#include <Akonadi/CalendarUtils>
#include <Akonadi/ETMCalendar>
#include <CalendarSupport/KCalPrefs>
......@@ -88,8 +90,12 @@ void WhatsNextView::updateView()
KCalendarCore::Event::List events;
events = calendar()->events(mStartDate, mEndDate, QTimeZone::systemTimeZone(), false);
events = calendar()->sortEvents(events, KCalendarCore::EventSortStartDate, KCalendarCore::SortDirectionAscending);
#if KCALCORE_VERSION < QT_VERSION_CHECK(5, 95, 0)
events = calendar()->sortEvents(events, KCalendarCore::EventSortStartDate, KCalendarCore::SortDirectionAscending);
#else
events = calendar()->sortEvents(std::move(events), KCalendarCore::EventSortStartDate, KCalendarCore::SortDirectionAscending);
#endif
if (!events.isEmpty()) {
mText += QLatin1String("<p></p>");
kil->loadIcon(QStringLiteral("view-calendar-day"), KIconLoader::NoGroup, 22, KIconLoader::DefaultState, QStringList(), &ipath);
......
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