Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 70c070f..91a7171 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -467,23 +467,22 @@ void AbTable::resizeRows() { | |||
467 | } | 467 | } |
468 | updateVisible(); | 468 | updateVisible(); |
469 | */ | 469 | */ |
470 | } | 470 | } |
471 | 471 | ||
472 | 472 | ||
473 | bool AbTable::save( const QString& /* fn */ ) | 473 | bool AbTable::save() |
474 | { | 474 | { |
475 | // QTime t; | 475 | // QTime t; |
476 | // t.start(); | 476 | // t.start(); |
477 | qWarning("abtable:Save data"); | 477 | qWarning("abtable:Save data"); |
478 | m_contactdb.save(); | ||
479 | 478 | ||
480 | return true; | 479 | return m_contactdb.save(); |
481 | } | 480 | } |
482 | 481 | ||
483 | void AbTable::load( const QString& /* fn */ ) | 482 | void AbTable::load() |
484 | { | 483 | { |
485 | setSorting( false ); | 484 | setSorting( false ); |
486 | setUpdatesEnabled( FALSE ); | 485 | setUpdatesEnabled( FALSE ); |
487 | 486 | ||
488 | qWarning("abtable:Load data"); | 487 | qWarning("abtable:Load data"); |
489 | 488 | ||
@@ -491,21 +490,25 @@ void AbTable::load( const QString& /* fn */ ) | |||
491 | OContactAccess::List::Iterator it; | 490 | OContactAccess::List::Iterator it; |
492 | setNumRows( list.count() ); | 491 | setNumRows( list.count() ); |
493 | int row = 0; | 492 | int row = 0; |
494 | for ( it = list.begin(); it != list.end(); ++it ) | 493 | for ( it = list.begin(); it != list.end(); ++it ) |
495 | insertIntoTable( *it, row++ ); | 494 | insertIntoTable( *it, row++ ); |
496 | 495 | ||
497 | resort(); | ||
498 | |||
499 | setUpdatesEnabled( TRUE ); | 496 | setUpdatesEnabled( TRUE ); |
500 | 497 | ||
501 | setSorting( true ); | 498 | setSorting( true ); |
502 | //resort(); | 499 | resort(); |
503 | } | 500 | } |
504 | 501 | ||
505 | 502 | ||
503 | void AbTable::reload() | ||
504 | { | ||
505 | m_contactdb.reload(); | ||
506 | load(); | ||
507 | } | ||
508 | |||
506 | void AbTable::realignTable( int row ) | 509 | void AbTable::realignTable( int row ) |
507 | { | 510 | { |
508 | QTableItem *ti1, | 511 | QTableItem *ti1, |
509 | *ti2; | 512 | *ti2; |
510 | int totalRows = numRows(); | 513 | int totalRows = numRows(); |
511 | for ( int curr = row; curr < totalRows - 1; curr++ ) { | 514 | for ( int curr = row; curr < totalRows - 1; curr++ ) { |