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

Adapt to KCalendarCore namespace change

parent af66f3e4
......@@ -156,7 +156,7 @@ An audio alarm (<tt>ACTION:AUDIO</tt>) can specify that each time the alarm trig
<ul><li>In the "main" alarm, <tt>X-KDE-KALARM-TYPE:SOUNDREPEAT</tt> is used to specify sound file repetition, because the <tt>REPEAT</tt> and <tt>DURATION</tt> properties apply to the overall event.
<ul>No pause between repetitions: <tt>X-KDE-KALARM-TYPE:SOUNDREPEAT</tt>
<br>Pause (in seconds) between repetitions: <tt>X-KDE-KALARM-TYPE:SOUNDREPEAT,<em>pause</em></tt></ul>
<li>In subsidiary alarms, the following scheme is used. The reason for this scheme is that KCalCore::Alarm cannot set a snooze time of zero.
<li>In subsidiary alarms, the following scheme is used. The reason for this scheme is that KCalendarCore::Alarm cannot set a snooze time of zero.
<ul>No pause between repetitions: <tt>REPEAT:-1</tt> (<tt>DURATION</tt> is ignored)
<br>Pause between repetitions: <tt>REPEAT:-2</tt> with <tt>DURATION</tt> containing the pause interval.</ul>
</ul>
......
......@@ -147,7 +147,7 @@ void KAEventTest::constructors()
QVERIFY(!event.isReadOnly());
}
// This tests the basic KCalCore::Event properties.
// This tests the basic KCalendarCore::Event properties.
// Custom properties are tested later.
const QDateTime createdDt(QDate(2009,4,13), QTime(11,14,0), QTimeZone("UTC"));
const QString uid(QStringLiteral("fd45-77398a2"));
......@@ -585,7 +585,7 @@ Alarm::Ptr copyKcalAlarm(Event::Ptr& kcalevent, Alarm::Ptr& kcalalarm)
void KAEventTest::fromKCalEvent()
{
// Check KCalCore::Event custom properties.
// Check KCalendarCore::Event custom properties.
const KADateTime dt(QDate(2010,5,13), QTime(3, 45, 0), QTimeZone("Europe/London"));
const QDateTime createdDt(QDate(2009,4,13), QTime(11,14,0), QTimeZone("UTC"));
......@@ -1214,7 +1214,7 @@ void KAEventTest::fromKCalEvent()
void KAEventTest::toKCalEvent()
{
// Check KCalCore::Event custom properties.
// Check KCalendarCore::Event custom properties.
const KADateTime dt(QDate(2010,5,13), QTime(3, 45, 0), QTimeZone("Europe/London"));
const KADateTime createdDt(QDate(2009,4,13), QTime(11,14,0), QTimeZone("UTC"));
const QString text = QStringLiteral("message");
......
......@@ -47,19 +47,19 @@ bool SerializerPluginKAlarm::deserialize(Item &item, const QByteArray &label, QI
return false;
}
KCalCore::Incidence::Ptr i = mFormat.fromString(QString::fromUtf8(data.readAll()));
KCalendarCore::Incidence::Ptr i = mFormat.fromString(QString::fromUtf8(data.readAll()));
if (!i) {
qCWarning(AKONADI_SERIALIZER_KALARM_LOG) << "Failed to parse incidence!";
data.seek(0);
qCWarning(AKONADI_SERIALIZER_KALARM_LOG) << QString::fromUtf8(data.readAll());
return false;
}
if (i->type() != KCalCore::Incidence::TypeEvent) {
if (i->type() != KCalendarCore::Incidence::TypeEvent) {
qCWarning(AKONADI_SERIALIZER_KALARM_LOG) << "Incidence with uid" << i->uid() << "is not an Event!";
data.seek(0);
return false;
}
KAEvent event(i.staticCast<KCalCore::Event>());
KAEvent event(i.staticCast<KCalendarCore::Event>());
const QString mime = CalEvent::mimeType(event.category());
if (mime.isEmpty() || !event.isValid()) {
qCWarning(AKONADI_SERIALIZER_KALARM_LOG) << "Event with uid" << event.id() << "contains no usable alarms!";
......@@ -107,7 +107,7 @@ void SerializerPluginKAlarm::serialize(const Item &item, const QByteArray &label
return;
}
const KAEvent e = item.payload<KAEvent>();
KCalCore::Event::Ptr kcalEvent(new KCalCore::Event);
KCalendarCore::Event::Ptr kcalEvent(new KCalendarCore::Event);
e.updateKCalEvent(kcalEvent, KAEvent::UID_SET);
QByteArray head = "BEGIN:VCALENDAR\nPRODID:";
head += KACalendar::icalProductId();
......@@ -115,7 +115,7 @@ void SerializerPluginKAlarm::serialize(const Item &item, const QByteArray &label
head += KAEvent::currentCalendarVersionString();
head += '\n';
data.write(head);
data.write(mFormat.toString(kcalEvent.staticCast<KCalCore::Incidence>()).toUtf8());
data.write(mFormat.toString(kcalEvent.staticCast<KCalendarCore::Incidence>()).toUtf8());
data.write("\nEND:VCALENDAR");
}
......
......@@ -26,7 +26,7 @@
#include <AkonadiCore/itemserializerplugin.h>
#include <AkonadiCore/differencesalgorithminterface.h>
#include <AkonadiCore/gidextractorinterface.h>
#include <KCalCore/ICalFormat>
#include <KCalendarCore/ICalFormat>
#include <QObject>
......@@ -51,7 +51,7 @@ public:
private:
void reportDifference(Akonadi::AbstractDifferencesReporter *, KAEventFormatter::Parameter);
KCalCore::ICalFormat mFormat;
KCalendarCore::ICalFormat mFormat;
KAEventFormatter mValueL;
KAEventFormatter mValueR;
QString mRegistered;
......
......@@ -294,7 +294,7 @@ QString KAEventFormatter::value(Parameter param) const
if (mEvent.repeatAtLogin(true)) {
return i18nc("@info Repeat at login", "At login until %1", dateTime(mEvent.mainDateTime().kDateTime()));
}
KCalCore::Event::Ptr eptr(new KCalCore::Event);
KCalendarCore::Event::Ptr eptr(new KCalendarCore::Event);
mEvent.updateKCalEvent(eptr, KAEvent::UID_SET);
return KCalUtils::IncidenceFormatter::recurrenceString(eptr);
}
......
......@@ -154,7 +154,7 @@ void AlarmText::setEmail(const QString &to, const QString &from, const QString &
d->mAkonadiItemId = itemId;
}
void AlarmText::setTodo(const KCalCore::Todo::Ptr &todo)
void AlarmText::setTodo(const KCalendarCore::Todo::Ptr &todo)
{
d->clear();
d->mType = Private::Todo;
......
......@@ -87,7 +87,7 @@ public:
/** Set the instance contents to be a todo.
* @param todo Todo instance to set as the text
*/
void setTodo(const KCalCore::Todo::Ptr &todo);
void setTodo(const KCalendarCore::Todo::Ptr &todo);
/** Return the text for a text message alarm, in display format.
* - An email is returned as a sequence of headers followed by the message body.
......
......@@ -87,10 +87,10 @@ enum {
unknown KAlarm format;
* >0 the older KAlarm version which wrote the calendar
*/
KALARMCAL_EXPORT int updateVersion(const KCalCore::FileStorage::Ptr &, QString &versionString);
KALARMCAL_EXPORT int updateVersion(const KCalendarCore::FileStorage::Ptr &, QString &versionString);
/** Set the KAlarm version custom property for a calendar. */
KALARMCAL_EXPORT void setKAlarmVersion(const KCalCore::Calendar::Ptr &);
KALARMCAL_EXPORT void setKAlarmVersion(const KCalendarCore::Calendar::Ptr &);
/** Set the program name and version for use in calendars. */
KALARMCAL_EXPORT void setProductId(const QByteArray &progName, const QByteArray &progVersion);
......@@ -127,8 +127,8 @@ enum Type {
Q_DECLARE_FLAGS(Types, Type)
KALARMCAL_EXPORT QString uid(const QString &id, Type);
KALARMCAL_EXPORT Type status(const KCalCore::Event::Ptr &, QString *param = nullptr);
KALARMCAL_EXPORT void setStatus(const KCalCore::Event::Ptr &, Type, const QString &param = QString());
KALARMCAL_EXPORT Type status(const KCalendarCore::Event::Ptr &, QString *param = nullptr);
KALARMCAL_EXPORT void setStatus(const KCalendarCore::Event::Ptr &, Type, const QString &param = QString());
/** Return the alarm Type for a mime type string. */
KALARMCAL_EXPORT Type type(const QString &mimeType);
......
......@@ -42,16 +42,16 @@ namespace KAlarmCal
//=============================================================================
typedef KCalCore::Person EmailAddress;
class EmailAddressList : public KCalCore::Person::List
typedef KCalendarCore::Person EmailAddress;
class EmailAddressList : public KCalendarCore::Person::List
{
public:
EmailAddressList() : KCalCore::Person::List() { }
EmailAddressList(const KCalCore::Person::List &list)
EmailAddressList() : KCalendarCore::Person::List() { }
EmailAddressList(const KCalendarCore::Person::List &list)
{
operator=(list);
}
EmailAddressList &operator=(const KCalCore::Person::List &);
EmailAddressList &operator=(const KCalendarCore::Person::List &);
operator QStringList() const;
QString join(const QString &separator) const;
QStringList pureAddresses() const;
......@@ -152,7 +152,7 @@ public:
KAEventPrivate(const KADateTime &, const QString &message, const QColor &bg, const QColor &fg,
const QFont &f, KAEvent::SubAction, int lateCancel, KAEvent::Flags flags,
bool changesPending = false);
explicit KAEventPrivate(const KCalCore::Event::Ptr &);
explicit KAEventPrivate(const KCalendarCore::Event::Ptr &);
KAEventPrivate(const KAEventPrivate &);
~KAEventPrivate()
{
......@@ -164,7 +164,7 @@ public:
copy(e);
} return *this;
}
void set(const KCalCore::Event::Ptr &);
void set(const KCalendarCore::Event::Ptr &);
void set(const KADateTime &, const QString &message, const QColor &bg, const QColor &fg,
const QFont &, KAEvent::SubAction, int lateCancel, KAEvent::Flags flags,
bool changesPending = false);
......@@ -179,7 +179,7 @@ public:
void defer(const DateTime &, bool reminder, bool adjustRecurrence = false);
void cancelDefer();
bool setDisplaying(const KAEventPrivate &, KAAlarm::Type, Akonadi::Collection::Id, const KADateTime &dt, bool showEdit, bool showDefer);
void reinstateFromDisplaying(const KCalCore::Event::Ptr &, Akonadi::Collection::Id &, bool &showEdit, bool &showDefer);
void reinstateFromDisplaying(const KCalendarCore::Event::Ptr &, Akonadi::Collection::Id &, bool &showEdit, bool &showDefer);
void startChanges()
{
++mChangeCount;
......@@ -189,7 +189,7 @@ public:
KAAlarm alarm(KAAlarm::Type) const;
KAAlarm firstAlarm() const;
KAAlarm nextAlarm(KAAlarm::Type) const;
bool updateKCalEvent(const KCalCore::Event::Ptr &, KAEvent::UidAction, bool setCustomProperties = true) const;
bool updateKCalEvent(const KCalendarCore::Event::Ptr &, KAEvent::UidAction, bool setCustomProperties = true) const;
DateTime mainDateTime(bool withRepeats = false) const
{
return (withRepeats && mNextRepeat && mRepetition)
......@@ -207,8 +207,8 @@ public:
KAEvent::OccurType nextOccurrence(const KADateTime &preDateTime, DateTime &result, KAEvent::OccurOption = KAEvent::IGNORE_REPETITION) const;
KAEvent::OccurType previousOccurrence(const KADateTime &afterDateTime, DateTime &result, bool includeRepetitions = false) const;
void setRecurrence(const KARecurrence &);
bool setRecur(KCalCore::RecurrenceRule::PeriodType, int freq, int count, const QDate &end, KARecurrence::Feb29Type = KARecurrence::Feb29_None);
bool setRecur(KCalCore::RecurrenceRule::PeriodType, int freq, int count, const KADateTime &end, KARecurrence::Feb29Type = KARecurrence::Feb29_None);
bool setRecur(KCalendarCore::RecurrenceRule::PeriodType, int freq, int count, const QDate &end, KARecurrence::Feb29Type = KARecurrence::Feb29_None);
bool setRecur(KCalendarCore::RecurrenceRule::PeriodType, int freq, int count, const KADateTime &end, KARecurrence::Feb29Type = KARecurrence::Feb29_None);
KARecurrence::Type checkRecur() const;
void clearRecur();
void calcTriggerTimes() const;
......@@ -217,11 +217,11 @@ public:
#else
void dumpDebug() const;
#endif
static bool convertRepetition(const KCalCore::Event::Ptr &);
static bool convertStartOfDay(const KCalCore::Event::Ptr &);
static DateTime readDateTime(const KCalCore::Event::Ptr &, bool localZone, bool dateOnly, DateTime &start);
static void readAlarms(const KCalCore::Event::Ptr &, AlarmMap *, bool cmdDisplay = false);
static void readAlarm(const KCalCore::Alarm::Ptr &, AlarmData &, bool audioMain, bool cmdDisplay = false);
static bool convertRepetition(const KCalendarCore::Event::Ptr &);
static bool convertStartOfDay(const KCalendarCore::Event::Ptr &);
static DateTime readDateTime(const KCalendarCore::Event::Ptr &, bool localZone, bool dateOnly, DateTime &start);
static void readAlarms(const KCalendarCore::Event::Ptr &, AlarmMap *, bool cmdDisplay = false);
static void readAlarm(const KCalendarCore::Alarm::Ptr &, AlarmData &, bool audioMain, bool cmdDisplay = false);
static QSharedPointer<const HolidayRegion> holidays();
private:
void copy(const KAEventPrivate &);
......@@ -230,9 +230,9 @@ private:
void calcNextWorkingTime(const DateTime &nextTrigger) const;
DateTime nextWorkingTime() const;
KAEvent::OccurType nextRecurrence(const KADateTime &preDateTime, DateTime &result) const;
void setAudioAlarm(const KCalCore::Alarm::Ptr &) const;
KCalCore::Alarm::Ptr initKCalAlarm(const KCalCore::Event::Ptr &, const DateTime &, const QStringList &types, AlarmType = INVALID_ALARM) const;
KCalCore::Alarm::Ptr initKCalAlarm(const KCalCore::Event::Ptr &, int startOffsetSecs, const QStringList &types, AlarmType = INVALID_ALARM) const;
void setAudioAlarm(const KCalendarCore::Alarm::Ptr &) const;
KCalendarCore::Alarm::Ptr initKCalAlarm(const KCalendarCore::Event::Ptr &, const DateTime &, const QStringList &types, AlarmType = INVALID_ALARM) const;
KCalendarCore::Alarm::Ptr initKCalAlarm(const KCalendarCore::Event::Ptr &, int startOffsetSecs, const QStringList &types, AlarmType = INVALID_ALARM) const;
inline void set_deferral(DeferType);
inline void activate_reminder(bool activate);
static int transitionIndex(const QDateTime &utc, const QTimeZone::OffsetDataList& transitions);
......@@ -530,12 +530,12 @@ KAEventPrivate::KAEventPrivate(const KADateTime &dt, const QString &message, con
set(dt, message, bg, fg, f, action, lateCancel, flags, changesPending);
}
KAEvent::KAEvent(const KCalCore::Event::Ptr &e)
KAEvent::KAEvent(const KCalendarCore::Event::Ptr &e)
: d(new KAEventPrivate(e))
{
}
KAEventPrivate::KAEventPrivate(const KCalCore::Event::Ptr &e)
KAEventPrivate::KAEventPrivate(const KCalendarCore::Event::Ptr &e)
: mRecurrence(nullptr)
{
set(e);
......@@ -651,15 +651,15 @@ void KAEventPrivate::copy(const KAEventPrivate &event)
}
}
void KAEvent::set(const KCalCore::Event::Ptr &e)
void KAEvent::set(const KCalendarCore::Event::Ptr &e)
{
d->set(e);
}
/******************************************************************************
* Initialise the KAEventPrivate from a KCalCore::Event.
* Initialise the KAEventPrivate from a KCalendarCore::Event.
*/
void KAEventPrivate::set(const KCalCore::Event::Ptr &event)
void KAEventPrivate::set(const KCalendarCore::Event::Ptr &event)
{
startChanges();
// Extract status from the event
......@@ -1199,7 +1199,7 @@ void KAEventPrivate::set(const KADateTime &dateTime, const QString &text, const
* properties are cleared and replaced with the KAEvent's custom properties. If
* false, the KCal::Event's non-KAlarm custom properties are left untouched.
*/
bool KAEvent::updateKCalEvent(const KCalCore::Event::Ptr &e, UidAction u, bool setCustomProperties) const
bool KAEvent::updateKCalEvent(const KCalendarCore::Event::Ptr &e, UidAction u, bool setCustomProperties) const
{
return d->updateKCalEvent(e, u, setCustomProperties);
}
......@@ -1494,14 +1494,14 @@ bool KAEventPrivate::updateKCalEvent(const Event::Ptr &ev, KAEvent::UidAction ui
* NOTE: The variant taking a DateTime calculates the offset from mStartDateTime,
* which is not suitable for an alarm in a recurring event.
*/
Alarm::Ptr KAEventPrivate::initKCalAlarm(const KCalCore::Event::Ptr &event, const DateTime &dt, const QStringList &types, AlarmType type) const
Alarm::Ptr KAEventPrivate::initKCalAlarm(const KCalendarCore::Event::Ptr &event, const DateTime &dt, const QStringList &types, AlarmType type) const
{
const int startOffset = dt.isDateOnly() ? mStartDateTime.secsTo(dt)
: mStartDateTime.calendarKDateTime().secsTo(dt.calendarKDateTime());
return initKCalAlarm(event, startOffset, types, type);
}
Alarm::Ptr KAEventPrivate::initKCalAlarm(const KCalCore::Event::Ptr &event, int startOffsetSecs, const QStringList &types, AlarmType type) const
Alarm::Ptr KAEventPrivate::initKCalAlarm(const KCalendarCore::Event::Ptr &event, int startOffsetSecs, const QStringList &types, AlarmType type) const
{
QStringList alltypes;
QStringList flags;
......@@ -2005,7 +2005,7 @@ bool KAEvent::copyToKOrganizer() const
return d->mCopyToKOrganizer;
}
void KAEvent::setEmail(uint from, const KCalCore::Person::List &addresses, const QString &subject,
void KAEvent::setEmail(uint from, const KCalendarCore::Person::List &addresses, const QString &subject,
const QStringList &attachments)
{
d->mEmailFromIdentity = from;
......@@ -2024,7 +2024,7 @@ uint KAEvent::emailFromId() const
return d->mEmailFromIdentity;
}
KCalCore::Person::List KAEvent::emailAddressees() const
KCalendarCore::Person::List KAEvent::emailAddressees() const
{
return d->mEmailAddresses;
}
......@@ -2039,7 +2039,7 @@ QString KAEvent::emailAddresses(const QString &sep) const
return d->mEmailAddresses.join(sep);
}
QString KAEvent::joinEmailAddresses(const KCalCore::Person::List &addresses, const QString &separator)
QString KAEvent::joinEmailAddresses(const KCalendarCore::Person::List &addresses, const QString &separator)
{
return EmailAddressList(addresses).join(separator);
}
......@@ -2918,13 +2918,13 @@ bool KAEvent::setRecurAnnualByPos(int freq, const QVector<MonthPos> &posns, cons
* end = end date/time (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
bool KAEventPrivate::setRecur(KCalCore::RecurrenceRule::PeriodType recurType, int freq, int count, const QDate &end, KARecurrence::Feb29Type feb29)
bool KAEventPrivate::setRecur(KCalendarCore::RecurrenceRule::PeriodType recurType, int freq, int count, const QDate &end, KARecurrence::Feb29Type feb29)
{
KADateTime edt = mNextMainDateTime.kDateTime();
edt.setDate(end);
return setRecur(recurType, freq, count, edt, feb29);
}
bool KAEventPrivate::setRecur(KCalCore::RecurrenceRule::PeriodType recurType, int freq, int count, const KADateTime &end, KARecurrence::Feb29Type feb29)
bool KAEventPrivate::setRecur(KCalendarCore::RecurrenceRule::PeriodType recurType, int freq, int count, const KADateTime &end, KARecurrence::Feb29Type feb29)
{
if (count >= -1 && (count || end.date().isValid())) {
if (!mRecurrence) {
......@@ -3431,7 +3431,7 @@ bool KAEventPrivate::setDisplaying(const KAEventPrivate &event, KAAlarm::Type al
/******************************************************************************
* Reinstate the original event from the 'displaying' event.
*/
void KAEvent::reinstateFromDisplaying(const KCalCore::Event::Ptr &e, Akonadi::Collection::Id &id, bool &showEdit, bool &showDefer)
void KAEvent::reinstateFromDisplaying(const KCalendarCore::Event::Ptr &e, Akonadi::Collection::Id &id, bool &showEdit, bool &showDefer)
{
d->reinstateFromDisplaying(e, id, showEdit, showDefer);
}
......
......@@ -340,15 +340,15 @@ public:
KAEvent(const KADateTime &dt, const QString &text, const QColor &bg, const QColor &fg,
const QFont &font, SubAction action, int lateCancel, Flags flags, bool changesPending = false);
/** Construct an event and initialise it from a KCalCore::Event.
/** Construct an event and initialise it from a KCalendarCore::Event.
*
* The initialisation is identical to that performed by set().
*/
explicit KAEvent(const KCalCore::Event::Ptr &);
explicit KAEvent(const KCalendarCore::Event::Ptr &);
/** Initialise the instance from a KCalCore::Event.
/** Initialise the instance from a KCalendarCore::Event.
*
* It uses the following properties from KCalCore::Event:
* It uses the following properties from KCalendarCore::Event:
* - Unique ID.
* - Summary.
* - Creation date/time.
......@@ -361,7 +361,7 @@ public:
* - Custom status if equal to "DISABLED".
* - Revision number.
*/
void set(const KCalCore::Event::Ptr &);
void set(const KCalendarCore::Event::Ptr &);
KAEvent(const KAEvent &other);
~KAEvent();
......@@ -389,7 +389,7 @@ public:
const QColor &fg, const QFont &font, SubAction action, int lateCancel,
Flags flags, bool changesPending = false);
/** Update an existing KCalCore::Event with the KAEvent data.
/** Update an existing KCalendarCore::Event with the KAEvent data.
* @param event Event to update.
* @param u how to deal with the Event's UID.
* @param setCustomProperties if true, all the Event's existing custom
......@@ -398,7 +398,7 @@ public:
* KCal::Event's non-KAlarm custom properties
* are left untouched.
*/
bool updateKCalEvent(const KCalCore::Event::Ptr &event, UidAction u, bool setCustomProperties = true) const;
bool updateKCalEvent(const KCalendarCore::Event::Ptr &event, UidAction u, bool setCustomProperties = true) const;
/** Return whether the instance represents a valid event. */
bool isValid() const;
......@@ -491,7 +491,7 @@ public:
/** Return the event's storage format compatibility compared to the current KAlarm calendar format. */
KACalendar::Compat compatibility() const;
/** Return the original KCalCore::Event's custom properties in the source calendar. */
/** Return the original KCalendarCore::Event's custom properties in the source calendar. */
QMap<QByteArray, QString> customProperties() const;
/** Return the action sub-type of the event's main alarm. For display alarms,
......@@ -617,7 +617,7 @@ public:
bool copyToKOrganizer() const;
/** Set the email related data for the event. */
void setEmail(uint from, const KCalCore::Person::List &, const QString &subject,
void setEmail(uint from, const KCalendarCore::Person::List &, const QString &subject,
const QStringList &attachments);
/** Return the email message body, for an email alarm.
......@@ -631,7 +631,7 @@ public:
uint emailFromId() const;
/** Return the list of email addressees, including names, for an email alarm. */
KCalCore::Person::List emailAddressees() const;
KCalendarCore::Person::List emailAddressees() const;
/** Return a list of the email addresses, including names, for an email alarm. */
QStringList emailAddresses() const;
......@@ -645,7 +645,7 @@ public:
* @param addresses list of email addresses
* @param sep separator string to insert between addresses
*/
static QString joinEmailAddresses(const KCalCore::Person::List &addresses, const QString &sep);
static QString joinEmailAddresses(const KCalendarCore::Person::List &addresses, const QString &sep);
/** Return the list of email addressees, excluding names, for an email alarm. */
QStringList emailPureAddresses() const;
......@@ -1111,7 +1111,7 @@ public:
/** Return the longest interval which can occur between consecutive recurrences.
* @see recurInterval()
*/
KCalCore::Duration longestRecurrenceInterval() const;
KCalendarCore::Duration longestRecurrenceInterval() const;
/** Adjust the event date/time to the first recurrence of the event, on or after
* the event start date/time. The event start date may not be a recurrence date,
......@@ -1209,7 +1209,7 @@ public:
* @param showEdit updated to true if Edit button was displayed, else false
* @param showDefer updated to true if Defer button was displayed, else false
*/
void reinstateFromDisplaying(const KCalCore::Event::Ptr &event, Akonadi::Collection::Id &colId, bool &showEdit, bool &showDefer);
void reinstateFromDisplaying(const KCalendarCore::Event::Ptr &event, Akonadi::Collection::Id &colId, bool &showEdit, bool &showDefer);
/** Return the original alarm which the displaying alarm refers to.
* Note that the caller is responsible for ensuring that the event was
......@@ -1303,7 +1303,7 @@ public:
* which does not require the adjustment.
* @return @c true if any conversions were done.
*/
static bool convertKCalEvents(const KCalCore::Calendar::Ptr &, int calendarVersion);
static bool convertKCalEvents(const KCalendarCore::Calendar::Ptr &, int calendarVersion);
/** Return a list of pointers to a list of KAEvent objects. */
static List ptrList(QVector<KAEvent> &events);
......
......@@ -115,7 +115,7 @@ KARecurrence::KARecurrence()
: d(new Private)
{ }
KARecurrence::KARecurrence(const KCalCore::Recurrence &r)
KARecurrence::KARecurrence(const KCalendarCore::Recurrence &r)
: d(new Private(r))
{
fix();
......@@ -216,7 +216,7 @@ bool KARecurrence::Private::set(Type recurType, int freq, int count, int f29, co
* Initialise a KARecurrence from recurrence parameters.
* Reply = true if successful.
*/
bool KARecurrence::init(KCalCore::RecurrenceRule::PeriodType t, int freq, int count,
bool KARecurrence::init(KCalendarCore::RecurrenceRule::PeriodType t, int freq, int count,
const KADateTime &start, const KADateTime &end)
{
return d->init(t, freq, count, -1, start, end);
......@@ -485,7 +485,7 @@ void KARecurrence::Private::fix()
* Initialise a KCal::Recurrence to be the same as this instance.
* Additional recurrence rules are created as necessary if it recurs on Feb 29th.
*/
void KARecurrence::writeRecurrence(KCalCore::Recurrence &recur) const
void KARecurrence::writeRecurrence(KCalendarCore::Recurrence &recur) const
{
d->writeRecurrence(this, recur);
}
......@@ -1268,7 +1268,7 @@ KARecurrence::Type KARecurrence::type() const
/******************************************************************************
* Return the recurrence rule type.
*/
KARecurrence::Type KARecurrence::type(const KCalCore::RecurrenceRule *rrule)
KARecurrence::Type KARecurrence::type(const KCalendarCore::RecurrenceRule *rrule)
{
switch (Recurrence::recurrenceType(rrule)) {
case Recurrence::rMinutely: return MINUTELY;
......
......@@ -82,7 +82,7 @@ public:
};
KARecurrence();
KARecurrence(const KCalCore::Recurrence &r);
KARecurrence(const KCalendarCore::Recurrence &r);
KARecurrence(const KARecurrence &r);
~KARecurrence();
......@@ -138,7 +138,7 @@ public:
* weekly, monthly, yearly or none.
* @return true if successful.
*/
bool init(KCalCore::RecurrenceRule::PeriodType t, int freq, int count, const KADateTime &start, const KADateTime &end);
bool init(KCalendarCore::RecurrenceRule::PeriodType t, int freq, int count, const KADateTime &start, const KADateTime &end);
/** Set up a KARecurrence from recurrence parameters, specifying how
* annual 29th February recurrences in non-leap years should be handled.
......@@ -146,18 +146,18 @@ public:
* weekly, monthly, yearly or none.
* @return true if successful.
*/
bool init(KCalCore::RecurrenceRule::PeriodType t, int freq, int count, const KADateTime &start, const KADateTime &end, Feb29Type f29);
bool init(KCalendarCore::RecurrenceRule::PeriodType t, int freq, int count, const KADateTime &start, const KADateTime &end, Feb29Type f29);
/** Removes all recurrence and exception rules and dates. */
void clear();
/** Initialise a KCalCore::Recurrence to be the same as this instance.
/** Initialise a KCalendarCore::Recurrence to be the same as this instance.
* Additional recurrence rules are created as necessary if it recurs on Feb 29th.
*/
void writeRecurrence(KCalCore::Recurrence &) const;
void writeRecurrence(KCalendarCore::Recurrence &) const;
/** Convert the recurrence to KARecurrence types.
* Must be called after presetting with a KCalCore::Recurrence.
* Must be called after presetting with a KCalendarCore::Recurrence.
* - Convert hourly recurrences to minutely.
* - Remove all but the first day in yearly date recurrences.
* - Check for yearly recurrences falling on February 29th and adjust them as
......@@ -219,7 +219,7 @@ public:
QBitArray days() const; // Emulate the old behavior
/** Returns list of day positions in months. */
QList<KCalCore::RecurrenceRule::WDayPos> monthPositions() const;
QList<KCalendarCore::RecurrenceRule::WDayPos> monthPositions() const;
/** Returns list of day numbers of a month. */
// Emulate old behavior
......@@ -259,7 +259,7 @@ public:
* Friday in the given months, otherwise as third Friday of the
* year.
*/
QList<KCalCore::RecurrenceRule::WDayPos> yearPositions() const;
QList<KCalendarCore::RecurrenceRule::WDayPos> yearPositions() const;
/** Adds days to the weekly day recurrence list.
* @param days a 7 bit array indicating which days on which to recur (bit 0 = Monday).
......@@ -349,7 +349,7 @@ public:
* @param date the date for which to find the recurrence times
* @param timeSpec time specification for @p date
*/
KCalCore::TimeList recurTimesOn(const QDate &date, const KADateTime::Spec &timeSpec) const;
KCalendarCore::TimeList recurTimesOn(const QDate &date, const KADateTime::Spec &timeSpec) const;
/** Returns a list of all the times at which the recurrence will occur
* between two specified times.
......@@ -363,7 +363,7 @@ public:
* @param end inclusive end of interval
* @return list of date/time values
*/
KCalCore::DateTimeList timesInInterval(const KADateTime &start, const KADateTime &end) const;
KCalendarCore::DateTimeList timesInInterval(const KADateTime &start, const KADateTime &end) const;
/** Returns frequency of recurrence, in terms of the recurrence time period type. */
int frequency() const;
......@@ -395,17 +395,17 @@ public:
/** Return the longest interval between recurrences.
* @return 0 if it never recurs.
*/
KCalCore::Duration longestInterval() const;
KCalendarCore::Duration longestInterval() const;
/** Return the interval between recurrences, if the interval between
* successive occurrences does not vary.
* @return 0 if recurrence does not occur at fixed intervals.
*/
KCalCore::Duration regularInterval() const;
KCalCore::DateTimeList exDateTimes() const;
KCalCore::DateList exDates() const;
void setExDateTimes(const KCalCore::DateTimeList &exdates);
void setExDates(const KCalCore::DateList &exdates);
KCalendarCore::Duration regularInterval() const;
KCalendarCore::DateTimeList exDateTimes() const;
KCalendarCore::DateList exDates() const;
void setExDateTimes(const KCalendarCore::DateTimeList &exdates);
void setExDates(const KCalendarCore::DateList &exdates);
void addExDateTime(const KADateTime &exdate);
void addExDate(const QDate &exdate);
......@@ -425,15 +425,15 @@ public:
*/
void shiftTimes(const QTimeZone &oldSpec, const QTimeZone &newSpec);
KCalCore::RecurrenceRule *defaultRRuleConst() const;
KCalendarCore::RecurrenceRule *defaultRRuleConst() const;
/** Return the recurrence's period type. */
Type type() const;
/** Return the type of a recurrence rule. */
static Type type(const KCalCore::RecurrenceRule *<