summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-26 01:11:54 (UTC)
committer zautrix <zautrix>2005-01-26 01:11:54 (UTC)
commitab91893abef351f53275248a50032a6d5175132a (patch) (unidiff)
tree7ecb1aba3741dbffb34ad28787538db942e4d448
parentc3ec0a5a43fb328f2d190b8adee1ef662746fb41 (diff)
downloadkdepimpi-ab91893abef351f53275248a50032a6d5175132a.zip
kdepimpi-ab91893abef351f53275248a50032a6d5175132a.tar.gz
kdepimpi-ab91893abef351f53275248a50032a6d5175132a.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp10
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp4
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmconverter.cpp52
3 files changed, 12 insertions, 54 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 9e61261..f3744bc 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -674,5 +674,5 @@ bool AddressBook::saveAB()
674 if ( (*it)->readOnly() ) 674 if ( (*it)->readOnly() )
675 qDebug("resource is readonly." ); 675 qDebug("SaveAB::resource is readonly." );
676 if ( (*it)->isOpen() ) 676 if ( (*it)->isOpen() )
677 qDebug("resource is open" ); 677 qDebug("SaveAB::resource is open" );
678 678
@@ -680,5 +680,5 @@ bool AddressBook::saveAB()
680 Ticket *ticket = requestSaveTicket( *it ); 680 Ticket *ticket = requestSaveTicket( *it );
681 qDebug("StdAddressBook::save '%s'", (*it)->resourceName().latin1() ); 681 qDebug("SaveAB::StdAddressBook::save '%s'", (*it)->resourceName().latin1() );
682 if ( !ticket ) { 682 if ( !ticket ) {
683 qDebug( i18n( "Unable to save to resource '%1'. It is locked." ) 683 qDebug( i18n( "SaveAB::Unable to save to resource '%1'. It is locked." )
684 .arg( (*it)->resourceName() ) ); 684 .arg( (*it)->resourceName() ) );
@@ -693,3 +693,3 @@ bool AddressBook::saveAB()
693 else 693 else
694 qDebug("StdAddressBook::resource saved '%s'", name.latin1() ); 694 qDebug("SaveAB::resource saved '%s'", name.latin1() );
695 695
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index 6413b42..e8f8bdd 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -140,3 +140,3 @@ bool ResourceSharpDTM::load()
140 SlZDataBase::addressbookItems(), 140 SlZDataBase::addressbookItems(),
141 0, false); 141 0, true);
142 } 142 }
@@ -145,3 +145,3 @@ bool ResourceSharpDTM::load()
145 145
146 qDebug("%xResourceSharpDTM::load: %s",this, fileName().latin1()); 146 qDebug("ResourceSharpDTM:: %x load: %s",this, fileName().latin1());
147 bool res = false; 147 bool res = false;
diff --git a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
index 95e16b6..4adcae4 100644
--- a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
+++ b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
@@ -422,3 +422,3 @@ bool SharpDTMConverter::setCategories( const Addressee &addr, SlZDataBase* datab
422 ids[index] = catDB->id(list[i]); 422 ids[index] = catDB->id(list[i]);
423 qDebug("set ex cat %d %s ",ids[index] , list[i].latin1()); 423 //qDebug("set exist cat %d %s ",ids[index] , list[i].latin1());
424 index++; 424 index++;
@@ -426,3 +426,3 @@ bool SharpDTMConverter::setCategories( const Addressee &addr, SlZDataBase* datab
426 ids[index] = catDB->addCategory(list[i]); 426 ids[index] = catDB->addCategory(list[i]);
427 qDebug("add new cat %d %s ",ids[index] , list[i].latin1()); 427 //qDebug("add new cat %d %s ",ids[index] , list[i].latin1());
428 index++; 428 index++;
@@ -431,6 +431,5 @@ bool SharpDTMConverter::setCategories( const Addressee &addr, SlZDataBase* datab
431 bool res ; 431 bool res ;
432 if ( res = database->updateCategories(contact, ids) ) 432
433 qDebug("cat updated "); 433 if ( !(res = database->updateCategories(contact, ids) ))
434 else 434 qDebug("SharpDTMConverter::Error updating categories");
435 qDebug("error cat updating ");
436 435
@@ -439,43 +438,2 @@ bool SharpDTMConverter::setCategories( const Addressee &addr, SlZDataBase* datab
439 438
440#if 0
441 m_pCategories = new SlCategories;
442catDB
443
444 if(categories == QString::null) return true;
445 QStringList list = CSVParser::parse(categories);
446 QArray<int> ids(list.count());
447 uint index = 0;
448 for(uint i=0; i<ids.size(); i++){
449#if 0
450 bool ok;
451 ids[index] = list[i].toInt(&ok);
452 if(ok){
453 index++;
454 } else {
455 if(m_pCategories->exists(list[i])){
456 ids[index] = m_pCategories->id(list[i]);
457 index++;
458 }
459 }
460#else
461 if(m_pCategories->exists(list[i])){
462 ids[index] = m_pCategories->id(list[i]);
463 index++;
464 } else if(m_addCategory){
465 ids[index] = m_pCategories->addCategory(list[i]);
466 index++;
467 }
468#endif
469 }
470 if(ids.size() > 0 && index == 0){
471 return true;
472 } else if(index != ids.size()){
473 ids.resize(index);
474 }
475 if(!m_pZdb->updateCategories(id, ids)){
476 return false;
477 }
478 return true;
479#endif
480
481QDate SharpDTMConverter::convertDate( QString s) 439QDate SharpDTMConverter::convertDate( QString s)