Commit d3fbd317 authored by Volker Krause's avatar Volker Krause

Adapt to KCalCore::Calendar API changes

parent 0a9860d5
......@@ -35,6 +35,7 @@
#include <kcalcore/event.h>
#include <QString>
#include <QTimeZone>
using namespace Akonadi;
using namespace KCalCore;
......@@ -336,7 +337,7 @@ void ITIPHandlerTest::testProcessITIPMessages()
}
QString expectedICalData = icalData(expected_filename);
KCalCore::MemoryCalendar::Ptr expectedCalendar = KCalCore::MemoryCalendar::Ptr(new KCalCore::MemoryCalendar(KDateTime::UTC));
KCalCore::MemoryCalendar::Ptr expectedCalendar = KCalCore::MemoryCalendar::Ptr(new KCalCore::MemoryCalendar(QTimeZone::utc()));
KCalCore::ICalFormat format;
format.fromString(expectedCalendar, expectedICalData);
compareCalendars(expectedCalendar); // Here's where the cool and complex comparations are done
......
......@@ -28,6 +28,7 @@
#include <collection.h>
#include <KLocalizedString>
#include <QTimeZone>
using namespace Akonadi;
using namespace KCalCore;
......@@ -408,7 +409,7 @@ void CalendarBasePrivate::handleParentChanged(const KCalCore::Incidence::Ptr &ne
}
CalendarBase::CalendarBase(QObject *parent)
: MemoryCalendar(KDateTime::LocalZone)
: MemoryCalendar(QTimeZone::systemTimeZone())
, d_ptr(new CalendarBasePrivate(this))
{
setParent(parent);
......@@ -416,7 +417,7 @@ CalendarBase::CalendarBase(QObject *parent)
}
CalendarBase::CalendarBase(CalendarBasePrivate *const dd, QObject *parent)
: MemoryCalendar(KDateTime::LocalZone)
: MemoryCalendar(QTimeZone::systemTimeZone())
, d_ptr(dd)
{
setParent(parent);
......
......@@ -51,6 +51,7 @@
#include <QTimerEvent>
#include <QStandardPaths>
#include <QTemporaryFile>
#include <QTimeZone>
#include <KJobWidgets/KJobWidgets>
using namespace Akonadi;
......@@ -756,7 +757,7 @@ void FreeBusyManager::setCalendar(const Akonadi::ETMCalendar::Ptr &c)
d->mCalendar = c;
if (d->mCalendar) {
d->mFormat.setTimeSpec(d->mCalendar->timeSpec());
d->mFormat.setTimeZone(d->mCalendar->timeZone());
connect(d->mCalendar.data(), SIGNAL(calendarChanged()), SLOT(uploadFreeBusy()));
}
......
......@@ -34,6 +34,7 @@
#include <QDBusInterface>
#include <QTemporaryFile>
#include <QTimeZone>
using namespace KCalCore;
using namespace Akonadi;
......@@ -196,7 +197,7 @@ bool ICalImporter::importIntoExistingResource(const QUrl &url, Akonadi::Collecti
d->setErrorMessage(i18n("The specified file doesn't exist, aborting import."));
return false;
}
MemoryCalendar::Ptr temporaryCalendar(new MemoryCalendar(KDateTime::LocalZone));
MemoryCalendar::Ptr temporaryCalendar(new MemoryCalendar(QTimeZone::systemTimeZone()));
FileStorage storage(temporaryCalendar);
storage.setFileName(url.path());
bool success = storage.load();
......
......@@ -29,6 +29,7 @@
#include "akonadicalendar_debug.h"
#include <KLocalizedString>
#include <KMessageBox>
#include <QTimeZone>
using namespace KCalCore;
using namespace Akonadi;
......@@ -50,7 +51,7 @@ Scheduler::Scheduler(QObject *parent) : QObject(parent)
, d(new Akonadi::Scheduler::Private(this))
{
mFormat = new ICalFormat();
mFormat->setTimeSpec(KDateTime::LocalZone);
mFormat->setTimeZone(QTimeZone::systemTimeZone());
}
Scheduler::~Scheduler()
......
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