Changeset View
Changeset View
Standalone View
Standalone View
src/utils.h
Show All 18 Lines | 1 | /* | |||
---|---|---|---|---|---|
19 | Boston, MA 02110-1301, USA. | 19 | Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef KCALCORE_UTILS_H_ | 22 | #ifndef KCALCORE_UTILS_H_ | ||
23 | #define KCALCORE_UTILS_H_ | 23 | #define KCALCORE_UTILS_H_ | ||
24 | 24 | | |||
25 | #include "kcalcore_export.h" | 25 | #include "kcalcore_export.h" | ||
26 | 26 | | |||
27 | #include "sortablelist.h" | | |||
28 | | ||||
29 | #include <QDateTime> | 27 | #include <QDateTime> | ||
30 | 28 | | |||
31 | class QDataStream; | 29 | class QDataStream; | ||
32 | 30 | | |||
33 | namespace KCalCore { | 31 | namespace KCalCore { | ||
34 | 32 | | |||
35 | // TODO: PORTING-helper only, remove once KDateTime is gone | 33 | // TODO: PORTING-helper only, remove once KDateTime is gone | ||
36 | /** | 34 | /** | ||
37 | * Helpers to retain backwards compatibility of binary serialization. | 35 | * Helpers to retain backwards compatibility of binary serialization. | ||
38 | */ | 36 | */ | ||
39 | KCALCORE_EXPORT void serializeQDateTimeAsKDateTime(QDataStream &out, const QDateTime &dt); | 37 | KCALCORE_EXPORT void serializeQDateTimeAsKDateTime(QDataStream &out, const QDateTime &dt); | ||
40 | KCALCORE_EXPORT void deserializeKDateTimeAsQDateTime(QDataStream &in, QDateTime &dt); | 38 | KCALCORE_EXPORT void deserializeKDateTimeAsQDateTime(QDataStream &in, QDateTime &dt); | ||
41 | 39 | | |||
42 | void serializeQDateTimeSortableList(QDataStream &out, const SortableList<QDateTime> &list); | 40 | void serializeQDateTimeList(QDataStream &out, const QList<QDateTime> &list); | ||
43 | void deserializeQDateTimeSortableList(QDataStream &in, SortableList<QDateTime> &list); | 41 | void deserializeQDateTimeList(QDataStream &in, QList<QDateTime> &list); | ||
44 | 42 | | |||
45 | void serializeQTimeZoneAsSpec(QDataStream &out, const QTimeZone &tz); | 43 | void serializeQTimeZoneAsSpec(QDataStream &out, const QTimeZone &tz); | ||
46 | void deserializeSpecAsQTimeZone(QDataStream &in, QTimeZone &tz); | 44 | void deserializeSpecAsQTimeZone(QDataStream &in, QTimeZone &tz); | ||
47 | 45 | | |||
48 | 46 | | |||
49 | } | 47 | } | ||
50 | 48 | | |||
51 | #endif | 49 | #endif |