Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp | 1 |
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 | |||
@@ -421,24 +421,25 @@ QArray<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 | ||
431 | bool OPimContactAccessBackend_SQL::add ( const OPimContact &newcontact ) | 431 | bool 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 | } |