Changeset View
Changeset View
Standalone View
Standalone View
src/journal.cpp
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 93 | { | |||
---|---|---|---|---|---|
98 | } | 98 | } | ||
99 | default: | 99 | default: | ||
100 | qCDebug(KCALCORE_LOG) << "Unhandled role" << role; | 100 | qCDebug(KCALCORE_LOG) << "Unhandled role" << role; | ||
101 | } | 101 | } | ||
102 | } | 102 | } | ||
103 | 103 | | |||
104 | void Journal::virtual_hook(VirtualHook id, void *data) | 104 | void Journal::virtual_hook(VirtualHook id, void *data) | ||
105 | { | 105 | { | ||
106 | switch (id) { | 106 | Q_UNUSED(id); | ||
107 | case IncidenceBase::SerializerHook: | 107 | Q_UNUSED(data); | ||
108 | serialize(*reinterpret_cast<QDataStream *>(data)); | | |||
109 | break; | | |||
110 | case IncidenceBase::DeserializerHook: | | |||
111 | deserialize(*reinterpret_cast<QDataStream *>(data)); | | |||
112 | break; | | |||
113 | default: | | |||
114 | Q_ASSERT(false); | | |||
115 | } | | |||
116 | } | 108 | } | ||
117 | 109 | | |||
118 | QLatin1String Journal::mimeType() const | 110 | QLatin1String Journal::mimeType() const | ||
119 | { | 111 | { | ||
120 | return Journal::journalMimeType(); | 112 | return Journal::journalMimeType(); | ||
121 | } | 113 | } | ||
122 | 114 | | |||
123 | /* static */ | 115 | /* static */ | ||
124 | QLatin1String Journal::journalMimeType() | 116 | QLatin1String Journal::journalMimeType() | ||
125 | { | 117 | { | ||
126 | return QLatin1String("application/x-vnd.akonadi.calendar.journal"); | 118 | return QLatin1String("application/x-vnd.akonadi.calendar.journal"); | ||
127 | } | 119 | } | ||
128 | 120 | | |||
129 | QLatin1String Journal::iconName(const QDateTime &) const | 121 | QLatin1String Journal::iconName(const QDateTime &) const | ||
130 | { | 122 | { | ||
131 | return QLatin1String("view-pim-journal"); | 123 | return QLatin1String("view-pim-journal"); | ||
132 | } | 124 | } | ||
133 | 125 | | |||
134 | void Journal::serialize(QDataStream &out) | 126 | void Journal::serialize(QDataStream &out) const | ||
135 | { | 127 | { | ||
136 | Incidence::serialize(out); | 128 | Incidence::serialize(out); | ||
137 | } | 129 | } | ||
138 | 130 | | |||
139 | void Journal::deserialize(QDataStream &in) | 131 | void Journal::deserialize(QDataStream &in) | ||
140 | { | 132 | { | ||
141 | Incidence::deserialize(in); | 133 | Incidence::deserialize(in); | ||
142 | } | 134 | } | ||
143 | 135 | | |||
144 | bool Journal::supportsGroupwareCommunication() const | 136 | bool Journal::supportsGroupwareCommunication() const | ||
145 | { | 137 | { | ||
146 | return false; | 138 | return false; | ||
147 | } | 139 | } |