summaryrefslogtreecommitdiff
path: root/libopie/pim/otodoaccessxml.cpp
Unidiff
Diffstat (limited to 'libopie/pim/otodoaccessxml.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/otodoaccessxml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp
index cda300b..71e8787 100644
--- a/libopie/pim/otodoaccessxml.cpp
+++ b/libopie/pim/otodoaccessxml.cpp
@@ -234,49 +234,49 @@ bool OTodoAccessXML::save() {
234 return false; 234 return false;
235 } 235 }
236 /* flush before renaming */ 236 /* flush before renaming */
237 f.close(); 237 f.close();
238 238
239 if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) { 239 if( ::rename( strNewFile.latin1(), m_file.latin1() ) < 0 ) {
240// qWarning("error renaming"); 240// qWarning("error renaming");
241 QFile::remove( strNewFile ); 241 QFile::remove( strNewFile );
242 } 242 }
243 243
244 m_changed = false; 244 m_changed = false;
245 return true; 245 return true;
246} 246}
247QArray<int> OTodoAccessXML::allRecords()const { 247QArray<int> OTodoAccessXML::allRecords()const {
248 QArray<int> ids( m_events.count() ); 248 QArray<int> ids( m_events.count() );
249 QMap<int, OTodo>::ConstIterator it; 249 QMap<int, OTodo>::ConstIterator it;
250 int i = 0; 250 int i = 0;
251 251
252 for ( it = m_events.begin(); it != m_events.end(); ++it ) { 252 for ( it = m_events.begin(); it != m_events.end(); ++it ) {
253 ids[i] = it.key(); 253 ids[i] = it.key();
254 i++; 254 i++;
255 } 255 }
256 return ids; 256 return ids;
257} 257}
258QArray<int> OTodoAccessXML::queryByExample( const OTodo&, int ) { 258QArray<int> OTodoAccessXML::queryByExample( const OTodo&, int, const QDateTime& ) {
259 QArray<int> ids(0); 259 QArray<int> ids(0);
260 return ids; 260 return ids;
261} 261}
262OTodo OTodoAccessXML::find( int uid )const { 262OTodo OTodoAccessXML::find( int uid )const {
263 OTodo todo; 263 OTodo todo;
264 todo.setUid( 0 ); // isEmpty() 264 todo.setUid( 0 ); // isEmpty()
265 QMap<int, OTodo>::ConstIterator it = m_events.find( uid ); 265 QMap<int, OTodo>::ConstIterator it = m_events.find( uid );
266 if ( it != m_events.end() ) 266 if ( it != m_events.end() )
267 todo = it.data(); 267 todo = it.data();
268 268
269 return todo; 269 return todo;
270} 270}
271void OTodoAccessXML::clear() { 271void OTodoAccessXML::clear() {
272 if (m_opened ) 272 if (m_opened )
273 m_changed = true; 273 m_changed = true;
274 274
275 m_events.clear(); 275 m_events.clear();
276} 276}
277bool OTodoAccessXML::add( const OTodo& todo ) { 277bool OTodoAccessXML::add( const OTodo& todo ) {
278// qWarning("add"); 278// qWarning("add");
279 m_changed = true; 279 m_changed = true;
280 m_events.insert( todo.uid(), todo ); 280 m_events.insert( todo.uid(), todo );
281 281
282 return true; 282 return true;