Changeset View
Changeset View
Standalone View
Standalone View
src/vcalformat.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
48 | #include <libical/vobject.h> | 48 | #include <libical/vobject.h> | ||
49 | } | 49 | } | ||
50 | 50 | | |||
51 | #include <QBitArray> | 51 | #include <QBitArray> | ||
52 | #include <QFile> | 52 | #include <QFile> | ||
53 | #include <QTextDocument> // for .toHtmlEscaped() and Qt::mightBeRichText() | 53 | #include <QTextDocument> // for .toHtmlEscaped() and Qt::mightBeRichText() | ||
54 | #include <QTimeZone> | 54 | #include <QTimeZone> | ||
55 | 55 | | |||
56 | using namespace KCalCore; | 56 | using namespace KCalendarCore; | ||
57 | 57 | | |||
58 | /** | 58 | /** | ||
59 | Private class that helps to provide binary compatibility between releases. | 59 | Private class that helps to provide binary compatibility between releases. | ||
60 | @internal | 60 | @internal | ||
61 | */ | 61 | */ | ||
62 | //@cond PRIVATE | 62 | //@cond PRIVATE | ||
63 | template <typename K> | 63 | template <typename K> | ||
64 | void removeAllVCal(QVector< QSharedPointer<K> > &c, const QSharedPointer<K> &x) | 64 | void removeAllVCal(QVector< QSharedPointer<K> > &c, const QSharedPointer<K> &x) | ||
65 | { | 65 | { | ||
66 | if (c.count() < 1) { | 66 | if (c.count() < 1) { | ||
67 | return; | 67 | return; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | int cnt = c.count(x); | 70 | int cnt = c.count(x); | ||
71 | if (cnt != 1) { | 71 | if (cnt != 1) { | ||
72 | qCritical() << "There number of relatedTos for this incidence is " | 72 | qCritical() << "There number of relatedTos for this incidence is " | ||
73 | << cnt << " (there must be 1 relatedTo only)"; | 73 | << cnt << " (there must be 1 relatedTo only)"; | ||
74 | Q_ASSERT_X(false, "removeAllVCal", "Count is not 1."); | 74 | Q_ASSERT_X(false, "removeAllVCal", "Count is not 1."); | ||
75 | return; | 75 | return; | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | c.remove(c.indexOf(x)); | 78 | c.remove(c.indexOf(x)); | ||
79 | } | 79 | } | ||
80 | 80 | | |||
81 | class Q_DECL_HIDDEN KCalCore::VCalFormat::Private | 81 | class Q_DECL_HIDDEN KCalendarCore::VCalFormat::Private | ||
82 | { | 82 | { | ||
83 | public: | 83 | public: | ||
84 | Calendar::Ptr mCalendar; | 84 | Calendar::Ptr mCalendar; | ||
85 | Event::List mEventsRelate; // Events with relations | 85 | Event::List mEventsRelate; // Events with relations | ||
86 | Todo::List mTodosRelate; // To-dos with relations | 86 | Todo::List mTodosRelate; // To-dos with relations | ||
87 | QSet<QByteArray> mManuallyWrittenExtensionFields; // X- fields that are manually dumped | 87 | QSet<QByteArray> mManuallyWrittenExtensionFields; // X- fields that are manually dumped | ||
88 | }; | 88 | }; | ||
89 | //@endcond | 89 | //@endcond | ||
90 | 90 | | |||
91 | VCalFormat::VCalFormat() : d(new KCalCore::VCalFormat::Private) | 91 | VCalFormat::VCalFormat() : d(new KCalendarCore::VCalFormat::Private) | ||
92 | { | 92 | { | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | VCalFormat::~VCalFormat() | 95 | VCalFormat::~VCalFormat() | ||
96 | { | 96 | { | ||
97 | delete d; | 97 | delete d; | ||
98 | } | 98 | } | ||
99 | 99 | | |||
▲ Show 20 Lines • Show All 1629 Lines • Show Last 20 Lines |