Commit d33febce authored by Laurent Montel's avatar Laurent Montel
Browse files

We depend against kf5.98

parent 3cdcfffe
Pipeline #236398 passed with stage
in 4 minutes and 3 seconds
......@@ -19,7 +19,6 @@
#include <KConfig>
#include <KConfigGroup>
#include <KWordWrap>
#include <kcalendarcore_version.h>
#include <KLocalizedString>
#include <QAbstractTextDocumentLayout>
......@@ -1779,11 +1778,7 @@ void CalPrintPluginBase::drawTodo(int &count,
for (const KCalendarCore::Todo::Ptr &todo : std::as_const(t)) {
tl.append(todo);
}
#if KCALENDARCORE_VERSION < QT_VERSION_CHECK(5, 95, 0)
KCalendarCore::Todo::List sl = mCalendar->sortTodos(tl, sortField, sortDir);
#else
KCalendarCore::Todo::List sl = mCalendar->sortTodos(std::move(tl), sortField, sortDir);
#endif
#endif
int subcount = 0;
......
......@@ -9,7 +9,6 @@
#include "utils.h"
#include "calendarsupport_debug.h"
#include "kcalprefs.h"
#include <kholidays_version.h>
#include <Akonadi/AgentInstance>
#include <Akonadi/AgentManager>
......@@ -526,11 +525,7 @@ QList<QDate> CalendarSupport::workDays(QDate startDate, QDate endDate)
for (const QString &regionStr : holidays) {
KHolidays::HolidayRegion region(regionStr);
if (region.isValid()) {
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
for (auto const &h : region.holidays(startDate, endDate)) {
#else
for (auto const &h : region.rawHolidaysWithAstroSeasons(startDate, endDate)) {
#endif
if (h.dayType() == KHolidays::Holiday::NonWorkday) {
for (int i = 0; i < h.duration(); i++) {
result.removeOne(h.observedStartDate().addDays(i));
......@@ -553,11 +548,7 @@ QStringList CalendarSupport::holiday(QDate date)
for (const QString &regionStr : holidays) {
KHolidays::HolidayRegion region(regionStr);
if (region.isValid()) {
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
const KHolidays::Holiday::List list = region.holidays(date);
#else
const KHolidays::Holiday::List list = region.rawHolidaysWithAstroSeasons(date);
#endif
const int listCount = list.count();
for (int i = 0; i < listCount; ++i) {
// don't add duplicates.
......
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