Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ccd4ef93 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Use conversion helper methods to convert between KDT and QDT

parent 89cfdeaf
......@@ -45,6 +45,7 @@
#include <KCalCore/CalFilter>
#include <KCalCore/CalFormat>
#include <KCalCore/OccurrenceIterator>
#include <KCalCore/Utils>
#include <KIconLoader> // for SmallIcon()
#include <KMessageBox>
......@@ -1600,7 +1601,7 @@ void AgendaView::updateEventDates(AgendaItem *item, bool addIncidence,
}
if (!incidence->hasRecurrenceId()) {
item->setOccurrenceDateTime(startDt.dateTime());
item->setOccurrenceDateTime(KCalCore::k2q(startDt));
}
bool result;
......@@ -1910,7 +1911,7 @@ bool AgendaView::displayIncidence(const KCalCore::Incidence::Ptr &incidence, bo
busyEvents.append(event);
}
d->insertIncidence(incidence, t->toLocalZone().dateTime(), t->toLocalZone().dateTime(), createSelected);
d->insertIncidence(incidence, KCalCore::k2q(t->toLocalZone()), KCalCore::k2q(t->toLocalZone()), createSelected);
}
// Can be multiday
......
......@@ -32,6 +32,7 @@
#include <CalendarSupport/KCalPrefs>
#include <CalendarSupport/Utils>
#include <KCalCore/Utils>
#include <KCalUtils/IncidenceFormatter>
#include <KCalUtils/RecurrenceActions>
......@@ -440,7 +441,7 @@ void IncidenceMonthItem::updateDates(int startOffset, int endOffset)
case KCalUtils::RecurrenceActions::SelectedOccurrence: // Just this occurrence
case KCalUtils::RecurrenceActions::FutureOccurrences: { // All future occurrences
const bool thisAndFuture = (res == KCalUtils::RecurrenceActions::FutureOccurrences);
QDateTime occurrenceDate(mIncidence->dtStart().dateTime());
QDateTime occurrenceDate(KCalCore::k2q(mIncidence->dtStart()));
occurrenceDate.setDate(startDate());
KCalCore::Incidence::Ptr newIncidence(KCalCore::Calendar::createException(
mIncidence, occurrenceDate, thisAndFuture));
......
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