Commit 9725ffe2 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Port Period and Duration to QDateTime

parent 83368213
......@@ -346,7 +346,7 @@ KCalCore::Event::Ptr BirthdaysResource::createEvent(const QDate &date)
Alarm::Ptr alarm = event->newAlarm();
alarm->setType(Alarm::Display);
alarm->setText(event->summary());
alarm->setTime(KDateTime(date, KDateTime::Spec(KDateTime::ClockTime)));
alarm->setTime(QDateTime(date, {}));
// N days before
alarm->setStartOffset(Duration(-Settings::self()->alarmDays(), Duration::Days));
alarm->setEnabled(true);
......
......@@ -20,6 +20,8 @@
#include <QVariant>
#include <QJsonDocument>
#include <KCalCore/Utils>
#include <KGAPI/Calendar/Reminder>
using namespace KGAPI2;
......@@ -98,7 +100,7 @@ KCalCore::Alarm::List DefaultReminderAttribute::alarms(KCalCore::Incidence *inci
KCalCore::Alarm::Ptr alarm(new KCalCore::Alarm(incidence));
alarm->setType(reminder->type());
alarm->setTime(incidence->dtStart());
alarm->setTime(KCalCore::k2q(incidence->dtStart()));
alarm->setStartOffset(reminder->startOffset());
alarm->setEnabled(true);
......
Markdown is supported
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