summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index 401a3c1..14207be 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -409,48 +409,49 @@ void OPimContactAccessBackend_SQL::clear ()
409 ClearQuery cle; 409 ClearQuery cle;
410 OSQLResult res = m_driver->query( &cle ); 410 OSQLResult res = m_driver->query( &cle );
411 411
412 reload(); 412 reload();
413} 413}
414 414
415bool OPimContactAccessBackend_SQL::wasChangedExternally() 415bool OPimContactAccessBackend_SQL::wasChangedExternally()
416{ 416{
417 return false; 417 return false;
418} 418}
419 419
420QArray<int> OPimContactAccessBackend_SQL::allRecords() const 420QArray<int> OPimContactAccessBackend_SQL::allRecords() const
421{ 421{
422 422
423 // FIXME: Think about cute handling of changed tables.. 423 // FIXME: Think about cute handling of changed tables..
424 // Thus, we don't have to call update here... 424 // Thus, we don't have to call update here...
425 if ( m_changed ) 425 if ( m_changed )
426 ((OPimContactAccessBackend_SQL*)this)->update(); 426 ((OPimContactAccessBackend_SQL*)this)->update();
427 427
428 return m_uids; 428 return m_uids;
429} 429}
430 430
431bool OPimContactAccessBackend_SQL::add ( const OPimContact &newcontact ) 431bool OPimContactAccessBackend_SQL::add ( const OPimContact &newcontact )
432{ 432{
433 qDebug("add in contact SQL-Backend");
433 InsertQuery ins( newcontact ); 434 InsertQuery ins( newcontact );
434 OSQLResult res = m_driver->query( &ins ); 435 OSQLResult res = m_driver->query( &ins );
435 436
436 if ( res.state() == OSQLResult::Failure ) 437 if ( res.state() == OSQLResult::Failure )
437 return false; 438 return false;
438 439
439 int c = m_uids.count(); 440 int c = m_uids.count();
440 m_uids.resize( c+1 ); 441 m_uids.resize( c+1 );
441 m_uids[c] = newcontact.uid(); 442 m_uids[c] = newcontact.uid();
442 443
443 return true; 444 return true;
444} 445}
445 446
446 447
447bool OPimContactAccessBackend_SQL::remove ( int uid ) 448bool OPimContactAccessBackend_SQL::remove ( int uid )
448{ 449{
449 RemoveQuery rem( uid ); 450 RemoveQuery rem( uid );
450 OSQLResult res = m_driver->query(&rem ); 451 OSQLResult res = m_driver->query(&rem );
451 452
452 if ( res.state() == OSQLResult::Failure ) 453 if ( res.state() == OSQLResult::Failure )
453 return false; 454 return false;
454 455
455 m_changed = true; 456 m_changed = true;
456 457