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

Compile with KF deprecation level 5.95 or higher as well

parent 4642d3ca
Pipeline #256474 passed with stage
in 7 minutes and 6 seconds
......@@ -6,6 +6,7 @@
#include "holidaycache_p.h"
#include <kholidays_version.h>
#include <KHolidays/HolidayRegion>
#include <QDate>
......@@ -69,7 +70,11 @@ KHolidays::Holiday HolidayCache::nextHoliday(const KHolidays::HolidayRegion &reg
entry.begin = std::min(it.value().begin, entry.begin);
entry.end = std::max(it.value().end, entry.end);
}
#if KHOLIDAYS_VERSION >= QT_VERSION_CHECK(5, 95, 0)
entry.holidays = region.rawHolidays(entry.begin, entry.end);
#else
entry.holidays = region.holidays(entry.begin, entry.end);
#endif
entry.holidays.erase(std::remove_if(entry.holidays.begin(), entry.holidays.end(), [](const auto &h) {
return h.dayType() != KHolidays::Holiday::NonWorkday;
}), entry.holidays.end());
......
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