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 41eac346 authored by Volker Krause's avatar Volker Krause

Port more of the calendar printing code to QDateTime

parent 6ce55b78
......@@ -28,7 +28,6 @@
#include <KCalCore/CalFormat>
#include <KLocalizedString>
#include <KSystemTimeZones>
#include <QStringList>
......@@ -51,7 +50,7 @@ FreeBusyCalendar::FreeBusyCalendar(QObject *parent)
: QObject(parent)
, d(new CalendarSupport::FreeBusyCalendarPrivate)
{
d->mCalendar = KCalCore::Calendar::Ptr(new KCalCore::MemoryCalendar(KSystemTimeZones::local()));
d->mCalendar = KCalCore::Calendar::Ptr(new KCalCore::MemoryCalendar(KDateTime::LocalZone));
qCDebug(CALENDARSUPPORT_LOG) << "creating" << this;
}
......
......@@ -39,7 +39,6 @@
#include <KDateTime>
#include <KConfigGroup>
#include <KSystemTimeZones>
#include <QDateTime>
#include <QPainter>
......@@ -795,8 +794,6 @@ void CalPrintDay::print(QPainter &p, int width, int height)
{
QDate curDay(mFromDate);
KDateTime::Spec timeSpec = KSystemTimeZones::local();
QRect headerBox(0, 0, width, headerHeight());
QRect footerBox(0, height - footerHeight(), width, footerHeight());
height -= footerHeight();
......@@ -848,7 +845,7 @@ void CalPrintDay::print(QPainter &p, int width, int height)
}
drawHeader(p, local.toString(curDay, QLocale::ShortFormat), curDay, QDate(), headerBox);
KCalCore::Event::List eventList = mCalendar->events(curDay, timeSpec,
KCalCore::Event::List eventList = mCalendar->events(curDay, KDateTime::LocalZone,
KCalCore::EventSortStartDate,
KCalCore::SortDirectionAscending);
......
This diff is collapsed.
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