Changeset View
Changeset View
Standalone View
Standalone View
src/memorycalendar.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 55 | { | |||
---|---|---|---|---|---|
57 | typename QMultiHash<K, V>::const_iterator it = c.find(x); | 57 | typename QMultiHash<K, V>::const_iterator it = c.find(x); | ||
58 | while (it != c.end() && it.key() == x) { | 58 | while (it != c.end() && it.key() == x) { | ||
59 | v.push_back(it.value()); | 59 | v.push_back(it.value()); | ||
60 | ++it; | 60 | ++it; | ||
61 | } | 61 | } | ||
62 | return v; | 62 | return v; | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | using namespace KCalCore; | 65 | using namespace KCalendarCore; | ||
66 | 66 | | |||
67 | /** | 67 | /** | ||
68 | Private class that helps to provide binary compatibility between releases. | 68 | Private class that helps to provide binary compatibility between releases. | ||
69 | @internal | 69 | @internal | ||
70 | */ | 70 | */ | ||
71 | //@cond PRIVATE | 71 | //@cond PRIVATE | ||
72 | class Q_DECL_HIDDEN KCalCore::MemoryCalendar::Private | 72 | class Q_DECL_HIDDEN KCalendarCore::MemoryCalendar::Private | ||
73 | { | 73 | { | ||
74 | public: | 74 | public: | ||
75 | Private(MemoryCalendar *qq) | 75 | Private(MemoryCalendar *qq) | ||
76 | : q(qq), mFormat(nullptr) | 76 | : q(qq), mFormat(nullptr) | ||
77 | { | 77 | { | ||
78 | } | 78 | } | ||
79 | ~Private() | 79 | ~Private() | ||
80 | { | 80 | { | ||
81 | } | 81 | } | ||
82 | 82 | | |||
83 | MemoryCalendar *q; | 83 | MemoryCalendar *q; | ||
84 | CalFormat *mFormat; // calendar format | 84 | CalFormat *mFormat; // calendar format | ||
85 | QString mIncidenceBeingUpdated; // Instance identifier of Incidence currently being updated | 85 | QString mIncidenceBeingUpdated; // Instance identifier of Incidence currently being updated | ||
86 | 86 | | |||
87 | /** | 87 | /** | ||
88 | * List of all incidences. | 88 | * List of all incidences. | ||
89 | * First indexed by incidence->type(), then by incidence->uid(); | 89 | * First indexed by incidence->type(), then by incidence->uid(); | ||
90 | */ | 90 | */ | ||
91 | QMap<IncidenceBase::IncidenceType, QMultiHash<QString, Incidence::Ptr> > mIncidences; | 91 | QMap<IncidenceBase::IncidenceType, QMultiHash<QString, Incidence::Ptr> > mIncidences; | ||
92 | 92 | | |||
93 | /** | 93 | /** | ||
94 | * Has all incidences, indexed by identifier. | 94 | * Has all incidences, indexed by identifier. | ||
95 | */ | 95 | */ | ||
96 | QHash<QString, KCalCore::Incidence::Ptr> mIncidencesByIdentifier; | 96 | QHash<QString, KCalendarCore::Incidence::Ptr> mIncidencesByIdentifier; | ||
97 | 97 | | |||
98 | /** | 98 | /** | ||
99 | * List of all deleted incidences. | 99 | * List of all deleted incidences. | ||
100 | * First indexed by incidence->type(), then by incidence->uid(); | 100 | * First indexed by incidence->type(), then by incidence->uid(); | ||
101 | */ | 101 | */ | ||
102 | QMap<IncidenceBase::IncidenceType, QMultiHash<QString, Incidence::Ptr> > mDeletedIncidences; | 102 | QMap<IncidenceBase::IncidenceType, QMultiHash<QString, Incidence::Ptr> > mDeletedIncidences; | ||
103 | 103 | | |||
104 | /** | 104 | /** | ||
Show All 21 Lines | |||||
126 | 126 | | |||
127 | void deleteAllIncidences(IncidenceBase::IncidenceType type); | 127 | void deleteAllIncidences(IncidenceBase::IncidenceType type); | ||
128 | 128 | | |||
129 | }; | 129 | }; | ||
130 | //@endcond | 130 | //@endcond | ||
131 | 131 | | |||
132 | MemoryCalendar::MemoryCalendar(const QTimeZone &timeZone) | 132 | MemoryCalendar::MemoryCalendar(const QTimeZone &timeZone) | ||
133 | : Calendar(timeZone), | 133 | : Calendar(timeZone), | ||
134 | d(new KCalCore::MemoryCalendar::Private(this)) | 134 | d(new KCalendarCore::MemoryCalendar::Private(this)) | ||
135 | { | 135 | { | ||
136 | } | 136 | } | ||
137 | 137 | | |||
138 | MemoryCalendar::MemoryCalendar(const QByteArray &timeZoneId) | 138 | MemoryCalendar::MemoryCalendar(const QByteArray &timeZoneId) | ||
139 | : Calendar(timeZoneId), | 139 | : Calendar(timeZoneId), | ||
140 | d(new KCalCore::MemoryCalendar::Private(this)) | 140 | d(new KCalendarCore::MemoryCalendar::Private(this)) | ||
141 | { | 141 | { | ||
142 | } | 142 | } | ||
143 | 143 | | |||
144 | MemoryCalendar::~MemoryCalendar() | 144 | MemoryCalendar::~MemoryCalendar() | ||
145 | { | 145 | { | ||
146 | close(); //NOLINT false clang-analyzer-optin.cplusplus.VirtualCall | 146 | close(); //NOLINT false clang-analyzer-optin.cplusplus.VirtualCall | ||
147 | delete d; | 147 | delete d; | ||
148 | } | 148 | } | ||
▲ Show 20 Lines • Show All 724 Lines • Show Last 20 Lines |