summaryrefslogtreecommitdiff
Unidiff
Diffstat (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
@@ -287,49 +287,49 @@ QArray<int> ODateBookAccessBackend_XML::queryByExample(const OPimEvent&, int, c
287 return QArray<int>(); 287 return QArray<int>();
288} 288}
289void ODateBookAccessBackend_XML::clear() { 289void 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}
294OPimEvent ODateBookAccessBackend_XML::find( int uid ) const{ 294OPimEvent 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
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}
335QArray<int> ODateBookAccessBackend_XML::nonRepeats()const { 335QArray<int> ODateBookAccessBackend_XML::nonRepeats()const {