Changeset View
Changeset View
Standalone View
Standalone View
src/event.cpp
Show First 20 Lines • Show All 305 Lines • ▼ Show 20 Line(s) | 304 | case RoleEnd: | |||
---|---|---|---|---|---|
306 | break; | 306 | break; | ||
307 | default: | 307 | default: | ||
308 | qCDebug(KCALCORE_LOG) << "Unhandled role" << role; | 308 | qCDebug(KCALCORE_LOG) << "Unhandled role" << role; | ||
309 | } | 309 | } | ||
310 | } | 310 | } | ||
311 | 311 | | |||
312 | void Event::virtual_hook(VirtualHook id, void *data) | 312 | void Event::virtual_hook(VirtualHook id, void *data) | ||
313 | { | 313 | { | ||
314 | switch (id) { | 314 | Q_UNUSED(id); | ||
315 | case IncidenceBase::SerializerHook: | 315 | Q_UNUSED(data); | ||
316 | serialize(*reinterpret_cast<QDataStream *>(data)); | | |||
317 | break; | | |||
318 | case IncidenceBase::DeserializerHook: | | |||
319 | deserialize(*reinterpret_cast<QDataStream *>(data)); | | |||
320 | break; | | |||
321 | default: | | |||
322 | Q_ASSERT(false); | | |||
323 | } | | |||
324 | } | 316 | } | ||
325 | 317 | | |||
326 | QLatin1String KCalCore::Event::mimeType() const | 318 | QLatin1String KCalCore::Event::mimeType() const | ||
327 | { | 319 | { | ||
328 | return Event::eventMimeType(); | 320 | return Event::eventMimeType(); | ||
329 | } | 321 | } | ||
330 | 322 | | |||
331 | QLatin1String Event::eventMimeType() | 323 | QLatin1String Event::eventMimeType() | ||
332 | { | 324 | { | ||
333 | return QLatin1String("application/x-vnd.akonadi.calendar.event"); | 325 | return QLatin1String("application/x-vnd.akonadi.calendar.event"); | ||
334 | } | 326 | } | ||
335 | 327 | | |||
336 | QLatin1String Event::iconName(const QDateTime &) const | 328 | QLatin1String Event::iconName(const QDateTime &) const | ||
337 | { | 329 | { | ||
338 | return QLatin1String("view-calendar-day"); | 330 | return QLatin1String("view-calendar-day"); | ||
339 | } | 331 | } | ||
340 | 332 | | |||
341 | void Event::serialize(QDataStream &out) | 333 | void Event::serialize(QDataStream &out) const | ||
342 | { | 334 | { | ||
343 | Incidence::serialize(out); | 335 | Incidence::serialize(out); | ||
344 | serializeQDateTimeAsKDateTime(out, d->mDtEnd); | 336 | serializeQDateTimeAsKDateTime(out, d->mDtEnd); | ||
345 | out << hasEndDate() << static_cast<quint32>(d->mTransparency) << d->mMultiDayValid << d->mMultiDay; | 337 | out << hasEndDate() << static_cast<quint32>(d->mTransparency) << d->mMultiDayValid << d->mMultiDay; | ||
346 | } | 338 | } | ||
347 | 339 | | |||
348 | void Event::deserialize(QDataStream &in) | 340 | void Event::deserialize(QDataStream &in) | ||
349 | { | 341 | { | ||
Show All 14 Lines |