Commit d1ca247e authored by Volker Krause's avatar Volker Krause
Browse files

Use calendar item access utility methods from akonadi-calendar

parent 3ab7aed6
Pipeline #167407 passed with stage
in 2 minutes and 47 seconds
......@@ -93,7 +93,11 @@ QVariant TodoSortFilterProxyModel::data(const QModelIndex &index, int role) cons
}
auto collectionId = todoItem.parentCollection().id();
#if AKONADICALENDAR_VERSION < QT_VERSION_CHECK(5, 20, 42)
auto todoPtr = CalendarSupport::todo(todoItem);
#else
auto todoPtr = Akonadi::CalendarUtils::todo(todoItem);
#endif
if (!todoPtr) {
return {};
......@@ -135,7 +139,11 @@ QVariant TodoSortFilterProxyModel::data(const QModelIndex &index, int role) cons
} else if (role == Roles::IncidenceTypeIconRole) {
return todoPtr->iconName();
} else if (role == Roles::IncidencePtrRole) {
#if AKONADICALENDAR_VERSION < QT_VERSION_CHECK(5, 20, 42)
return QVariant::fromValue(CalendarSupport::incidence(todoItem));
#else
return QVariant::fromValue(Akonadi::CalendarUtils::incidence(todoItem));
#endif
} else if (role == Roles::TagsRole) {
return QVariant::fromValue(todoItem.tags());
} else if (role == Roles::ItemRole) {
......
......@@ -10,7 +10,11 @@
#include <Akonadi/Calendar/ETMCalendar>
#endif
#include <CalendarSupport/KCalPrefs>
#if AKONADICALENDAR_VERSION < QT_VERSION_CHECK(5, 20, 42)
#include <CalendarSupport/Utils>
#else
#include <Akonadi/CalendarUtils>
#endif
#if AKONADICALENDAR_VERSION < QT_VERSION_CHECK(5, 20, 41)
#include <EventViews/IncidenceTreeModel>
#else
......
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