author | zecke <zecke> | 2004-07-17 17:33:39 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-17 17:33:39 (UTC) |
commit | b822cb8e0f2b1adc970eee9e40935adaf530e41b (patch) (unidiff) | |
tree | f42fe5d6144df85b35a7e1c8d008f28ca2532b1f /libopie2 | |
parent | 0637a8d3c60bf4da6efb6c26edecfe613919c623 (diff) | |
download | opie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.zip opie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.tar.gz opie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.tar.bz2 |
Allow the deletions of all events
This is the fix posted to the MailingList
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp index 2ff36e3..107c178 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | |||
@@ -287,49 +287,49 @@ QArray<int> ODateBookAccessBackend_XML::queryByExample(const OPimEvent&, int, c | |||
287 | return QArray<int>(); | 287 | return QArray<int>(); |
288 | } | 288 | } |
289 | void ODateBookAccessBackend_XML::clear() { | 289 | void ODateBookAccessBackend_XML::clear() { |
290 | m_changed = true; | 290 | m_changed = true; |
291 | m_raw.clear(); | 291 | m_raw.clear(); |
292 | m_rep.clear(); | 292 | m_rep.clear(); |
293 | } | 293 | } |
294 | OPimEvent ODateBookAccessBackend_XML::find( int uid ) const{ | 294 | OPimEvent ODateBookAccessBackend_XML::find( int uid ) const{ |
295 | if ( m_raw.contains( uid ) ) | 295 | if ( m_raw.contains( uid ) ) |
296 | return m_raw[uid]; | 296 | return m_raw[uid]; |
297 | else | 297 | else |
298 | return m_rep[uid]; | 298 | return m_rep[uid]; |
299 | } | 299 | } |
300 | bool ODateBookAccessBackend_XML::add( const OPimEvent& ev ) { | 300 | bool ODateBookAccessBackend_XML::add( const OPimEvent& ev ) { |
301 | m_changed = true; | 301 | m_changed = true; |
302 | if (ev.hasRecurrence() ) | 302 | if (ev.hasRecurrence() ) |
303 | m_rep.insert( ev.uid(), ev ); | 303 | m_rep.insert( ev.uid(), ev ); |
304 | else | 304 | else |
305 | m_raw.insert( ev.uid(), ev ); | 305 | m_raw.insert( ev.uid(), ev ); |
306 | 306 | ||
307 | return true; | 307 | return true; |
308 | } | 308 | } |
309 | bool ODateBookAccessBackend_XML::remove( int uid ) { | 309 | bool ODateBookAccessBackend_XML::remove( int uid ) { |
310 | m_changed = true; | 310 | m_changed = true; |
311 | m_rep.remove( uid ); | 311 | m_raw.remove( uid ); |
312 | m_rep.remove( uid ); | 312 | m_rep.remove( uid ); |
313 | 313 | ||
314 | return true; | 314 | return true; |
315 | } | 315 | } |
316 | bool ODateBookAccessBackend_XML::replace( const OPimEvent& ev ) { | 316 | bool ODateBookAccessBackend_XML::replace( const OPimEvent& ev ) { |
317 | replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers) | 317 | replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers) |
318 | return add( ev ); | 318 | return add( ev ); |
319 | } | 319 | } |
320 | QArray<int> ODateBookAccessBackend_XML::rawEvents()const { | 320 | QArray<int> ODateBookAccessBackend_XML::rawEvents()const { |
321 | return allRecords(); | 321 | return allRecords(); |
322 | } | 322 | } |
323 | QArray<int> ODateBookAccessBackend_XML::rawRepeats()const { | 323 | QArray<int> ODateBookAccessBackend_XML::rawRepeats()const { |
324 | QArray<int> ints( m_rep.count() ); | 324 | QArray<int> ints( m_rep.count() ); |
325 | uint i = 0; | 325 | uint i = 0; |
326 | QMap<int, OPimEvent>::ConstIterator it; | 326 | QMap<int, OPimEvent>::ConstIterator it; |
327 | 327 | ||
328 | for ( it = m_rep.begin(); it != m_rep.end(); ++it ) { | 328 | for ( it = m_rep.begin(); it != m_rep.end(); ++it ) { |
329 | ints[i] = it.key(); | 329 | ints[i] = it.key(); |
330 | i++; | 330 | i++; |
331 | } | 331 | } |
332 | 332 | ||
333 | return ints; | 333 | return ints; |
334 | } | 334 | } |
335 | QArray<int> ODateBookAccessBackend_XML::nonRepeats()const { | 335 | QArray<int> ODateBookAccessBackend_XML::nonRepeats()const { |