Commit 81ae5baf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile without deprecated methods

parent a3300342
Pipeline #181350 passed with stage
in 5 minutes and 17 seconds
......@@ -11,6 +11,7 @@
#include "korganizerinterface.h"
#include "todoplugin.h"
#include <CalendarSupport/CalendarSingleton>
#include <kcalcore_version.h>
#include <Akonadi/CalendarUtils>
#include <Akonadi/Collection>
......@@ -124,9 +125,18 @@ void TodoSummaryWidget::updateView()
prList.append(todo);
}
if (!prList.isEmpty()) {
#if KCALCORE_VERSION < QT_VERSION_CHECK(5, 95, 0)
prList = Akonadi::ETMCalendar::sortTodos(prList, KCalendarCore::TodoSortSummary, KCalendarCore::SortDirectionAscending);
prList = Akonadi::ETMCalendar::sortTodos(prList, KCalendarCore::TodoSortPriority, KCalendarCore::SortDirectionAscending);
prList = Akonadi::ETMCalendar::sortTodos(prList, KCalendarCore::TodoSortDueDate, KCalendarCore::SortDirectionAscending);
#else
KCalendarCore::Todo::List todoListSorted1(prList);
KCalendarCore::Todo::List todoListSorted2(prList);
KCalendarCore::Todo::List todoListSorted3(prList);
prList = Akonadi::ETMCalendar::sortTodos(std::move(todoListSorted1), KCalendarCore::TodoSortSummary, KCalendarCore::SortDirectionAscending);
prList = Akonadi::ETMCalendar::sortTodos(std::move(todoListSorted2), KCalendarCore::TodoSortPriority, KCalendarCore::SortDirectionAscending);
prList = Akonadi::ETMCalendar::sortTodos(std::move(todoListSorted3), KCalendarCore::TodoSortDueDate, KCalendarCore::SortDirectionAscending);
#endif
}
// The to-do print consists of the following fields:
......
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