summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-21 11:24:59 (UTC)
committer zautrix <zautrix>2004-09-21 11:24:59 (UTC)
commitf66482cac98648a1e5ea21fddd55e6916f2a1c60 (patch) (unidiff)
treec51d30ac1fcb67572654a7a4d2d845b57618f61c
parentba89a5d20eb054054d9cfae3723a4d62b9f62efd (diff)
downloadkdepimpi-f66482cac98648a1e5ea21fddd55e6916f2a1c60.zip
kdepimpi-f66482cac98648a1e5ea21fddd55e6916f2a1c60.tar.gz
kdepimpi-f66482cac98648a1e5ea21fddd55e6916f2a1c60.tar.bz2
latest fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/file/resourcefile.cpp1
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmconverter.cpp6
-rw-r--r--kaddressbook/kabcore.cpp6
3 files changed, 6 insertions, 7 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 6cd63fd..163f2b4 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -190,17 +190,16 @@ bool ResourceFile::doOpen()
190 190
191void ResourceFile::doClose() 191void ResourceFile::doClose()
192{ 192{
193} 193}
194 194
195bool ResourceFile::load() 195bool ResourceFile::load()
196{ 196{
197 197
198 qDebug("ResourceFile::loadfile %s ", mFileName.latin1());
199 QFile file( mFileName ); 198 QFile file( mFileName );
200 if ( !file.open( IO_ReadOnly ) ) { 199 if ( !file.open( IO_ReadOnly ) ) {
201 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) ); 200 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) );
202 return false; 201 return false;
203 } 202 }
204 203
205// qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1()); 204// qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1());
206 205
diff --git a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
index d36df20..6418b54 100644
--- a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
+++ b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
@@ -307,17 +307,17 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
307 database->writeField(ZdbAdrs::Emails, emails ); 307 database->writeField(ZdbAdrs::Emails, emails );
308 308
309 database->writeField(ZdbAdrs::DefaultEmail, addr.preferredEmail() ); 309 database->writeField(ZdbAdrs::DefaultEmail, addr.preferredEmail() );
310 310
311 311
312 // home 312 // home
313 const Address homeaddress = addr.address(Address::Home); 313 const Address homeaddress = addr.address(Address::Home);
314 if (!homeaddress.isEmpty()) { 314 if (!homeaddress.isEmpty()) {
315 qDebug("write home address "); 315 //qDebug("write home address ");
316 database->writeField(ZdbAdrs::HomeStreet, homeaddress.street()); 316 database->writeField(ZdbAdrs::HomeStreet, homeaddress.street());
317 database->writeField(ZdbAdrs::HomeCity, homeaddress.locality()); 317 database->writeField(ZdbAdrs::HomeCity, homeaddress.locality());
318 database->writeField(ZdbAdrs::HomeState, homeaddress.region()); 318 database->writeField(ZdbAdrs::HomeState, homeaddress.region());
319 database->writeField(ZdbAdrs::HomeZip, homeaddress.postalCode()); 319 database->writeField(ZdbAdrs::HomeZip, homeaddress.postalCode());
320 database->writeField(ZdbAdrs::HomeCountry, homeaddress.country()); 320 database->writeField(ZdbAdrs::HomeCountry, homeaddress.country());
321 } 321 }
322 322
323 PhoneNumber homephone = addr.phoneNumber( PhoneNumber::Home ); 323 PhoneNumber homephone = addr.phoneNumber( PhoneNumber::Home );
@@ -335,17 +335,17 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
335 } 335 }
336 336
337 database->writeField(ZdbAdrs::HomeWebPage, addr.url().url()); 337 database->writeField(ZdbAdrs::HomeWebPage, addr.url().url());
338 338
339 339
340 // business 340 // business
341 const Address businessaddress = addr.address(Address::Work); 341 const Address businessaddress = addr.address(Address::Work);
342 if (!businessaddress.isEmpty()) { 342 if (!businessaddress.isEmpty()) {
343 qDebug("write business address "); 343 //qDebug("write business address ");
344 database->writeField(ZdbAdrs::BusinessStreet, businessaddress.street()); 344 database->writeField(ZdbAdrs::BusinessStreet, businessaddress.street());
345 database->writeField(ZdbAdrs::BusinessCity, businessaddress.locality()); 345 database->writeField(ZdbAdrs::BusinessCity, businessaddress.locality());
346 database->writeField(ZdbAdrs::BusinessState, businessaddress.region()); 346 database->writeField(ZdbAdrs::BusinessState, businessaddress.region());
347 database->writeField(ZdbAdrs::BusinessZip, businessaddress.postalCode()); 347 database->writeField(ZdbAdrs::BusinessZip, businessaddress.postalCode());
348 database->writeField(ZdbAdrs::BusinessCountry, businessaddress.country()); 348 database->writeField(ZdbAdrs::BusinessCountry, businessaddress.country());
349 } 349 }
350 350
351 PhoneNumber businessphone = addr.phoneNumber( PhoneNumber::Work ); 351 PhoneNumber businessphone = addr.phoneNumber( PhoneNumber::Work );
@@ -424,17 +424,17 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
424 int ii; 424 int ii;
425 for ( ii = 0; ii < cats.count() ;++ii ) { 425 for ( ii = 0; ii < cats.count() ;++ii ) {
426 if ( !catDB->exists( cats[ii] )) 426 if ( !catDB->exists( cats[ii] ))
427 catDB->addCategory(cats[ii]); 427 catDB->addCategory(cats[ii]);
428 } 428 }
429 QArray<int> iar; 429 QArray<int> iar;
430 if ( !cats.isEmpty() ) { 430 if ( !cats.isEmpty() ) {
431 QArray<int> iar = catDB->ids(cats); 431 QArray<int> iar = catDB->ids(cats);
432 qDebug("***cat count is %d ", iar.count()); 432 //qDebug("***cat count is %d ", iar.count());
433 database->updateCategories(contact, iar); 433 database->updateCategories(contact, iar);
434 } 434 }
435 435
436 return true; 436 return true;
437} 437}
438 438
439QDate SharpDTMConverter::convertDate( QString s) 439QDate SharpDTMConverter::convertDate( QString s)
440{ 440{
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index c2f031a..4ebd6a8 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2550,26 +2550,26 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2550 // 3 cancel 2550 // 3 cancel
2551 QDateTime lastSync = mLastAddressbookSync; 2551 QDateTime lastSync = mLastAddressbookSync;
2552 QDateTime localMod = local->revision(); 2552 QDateTime localMod = local->revision();
2553 QDateTime remoteMod = remote->revision(); 2553 QDateTime remoteMod = remote->revision();
2554 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2554 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2555 bool remCh, locCh; 2555 bool remCh, locCh;
2556 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2556 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2557 2557
2558 qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 2558 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2559 locCh = ( localMod > mLastAddressbookSync ); 2559 locCh = ( localMod > mLastAddressbookSync );
2560 if ( !remCh && ! locCh ) { 2560 if ( !remCh && ! locCh ) {
2561 qDebug("both not changed "); 2561 //qDebug("both not changed ");
2562 lastSync = localMod.addDays(1); 2562 lastSync = localMod.addDays(1);
2563 if ( mode <= SYNC_PREF_ASK ) 2563 if ( mode <= SYNC_PREF_ASK )
2564 return 0; 2564 return 0;
2565 } else { 2565 } else {
2566 if ( locCh ) { 2566 if ( locCh ) {
2567 qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); 2567 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1());
2568 lastSync = localMod.addDays( -1 ); 2568 lastSync = localMod.addDays( -1 );
2569 if ( !remCh ) 2569 if ( !remCh )
2570 remoteMod =( lastSync.addDays( -1 ) ); 2570 remoteMod =( lastSync.addDays( -1 ) );
2571 } else { 2571 } else {
2572 //qDebug(" not loc changed "); 2572 //qDebug(" not loc changed ");
2573 lastSync = localMod.addDays( 1 ); 2573 lastSync = localMod.addDays( 1 );
2574 if ( remCh ) 2574 if ( remCh )
2575 remoteMod =( lastSync.addDays( 1 ) ); 2575 remoteMod =( lastSync.addDays( 1 ) );