summaryrefslogtreecommitdiff
path: root/libopie2
authorzecke <zecke>2004-07-17 17:33:39 (UTC)
committer zecke <zecke>2004-07-17 17:33:39 (UTC)
commitb822cb8e0f2b1adc970eee9e40935adaf530e41b (patch) (unidiff)
treef42fe5d6144df85b35a7e1c8d008f28ca2532b1f /libopie2
parent0637a8d3c60bf4da6efb6c26edecfe613919c623 (diff)
downloadopie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.zip
opie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.tar.gz
opie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.tar.bz2
Allow the deletions of all events
This is the fix posted to the MailingList
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp2
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
@@ -295,33 +295,33 @@ 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}
300bool ODateBookAccessBackend_XML::add( const OPimEvent& ev ) { 300bool 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}
309bool ODateBookAccessBackend_XML::remove( int uid ) { 309bool 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}
316bool ODateBookAccessBackend_XML::replace( const OPimEvent& ev ) { 316bool 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}
320QArray<int> ODateBookAccessBackend_XML::rawEvents()const { 320QArray<int> ODateBookAccessBackend_XML::rawEvents()const {
321 return allRecords(); 321 return allRecords();
322} 322}
323QArray<int> ODateBookAccessBackend_XML::rawRepeats()const { 323QArray<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