Commit a3300342 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated methods

parent c50bbc23
Pipeline #181265 failed with stage
in 2 minutes and 59 seconds
......@@ -134,7 +134,7 @@ configure_file(korganizer-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/korganizer
ecm_set_disabled_deprecation_versions(QT 5.15.2
KF 5.94.0
KF 5.95.0
KCOREADDONS 5.88.0 #KPluginFactory::registerPlugin
)
......
......@@ -8,8 +8,8 @@
#include "koglobals.h"
#include "prefs/koprefs.h"
#include <KHolidays/HolidayRegion>
#include <kholidays_version.h>
#include <QApplication>
......@@ -48,7 +48,11 @@ QMap<QDate, QStringList> KOGlobals::holiday(const QDate &start, const QDate &end
for (const KHolidays::HolidayRegion *region : std::as_const(mHolidayRegions)) {
if (region && region->isValid()) {
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
const KHolidays::Holiday::List list = region->holidays(start, end);
#else
const KHolidays::Holiday::List list = region->rawHolidaysWithAstroSeasons(start, end);
#endif
const int listCount(list.count());
for (int i = 0; i < listCount; ++i) {
const KHolidays::Holiday &h = list.at(i);
......
......@@ -11,6 +11,7 @@
#include "korganizer_kontactplugins_specialdates_debug.h"
#include <KontactInterface/Core>
#include <KontactInterface/Plugin>
#include <kholidays_version.h>
#include <Akonadi/ContactSearchJob>
#include <Akonadi/ContactViewerDialog>
......@@ -350,7 +351,11 @@ void SDSummaryWidget::createLabels()
if (mShowHolidays) {
if (initHolidays()) {
for (dt = QDate::currentDate(); dt <= QDate::currentDate().addDays(mDaysAhead - 1); dt = dt.addDays(1)) {
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
QList<Holiday> holidays = mHolidays->holidays(dt);
#else
QList<Holiday> holidays = mHolidays->rawHolidaysWithAstroSeasons(dt);
#endif
QList<Holiday>::ConstIterator it = holidays.constBegin();
for (; it != holidays.constEnd(); ++it) {
SDEntry entry;
......
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