summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-19 09:11:04 (UTC)
committer zautrix <zautrix>2004-09-19 09:11:04 (UTC)
commit953277a85e6ec5630ab0d64b4d68815e4e4f9906 (patch) (side-by-side diff)
tree0a6acbc3ecd65784c1e875159b720849bc27dc48
parent787181d34f0d195ad72c9cf6aedbc317b6dd713e (diff)
downloadkdepimpi-953277a85e6ec5630ab0d64b4d68815e4e4f9906.zip
kdepimpi-953277a85e6ec5630ab0d64b4d68815e4e4f9906.tar.gz
kdepimpi-953277a85e6ec5630ab0d64b4d68815e4e4f9906.tar.bz2
More AB sync
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp9
-rw-r--r--kaddressbook/kabcore.cpp16
2 files changed, 12 insertions, 13 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index d6b70c4..c34f671 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -268,7 +268,7 @@ void Addressee::computeCsum(const QString &dev)
l.append( t[iii] );
}
uint cs = getCsum4List(l);
- qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() );
+ // qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() );
setCsum( dev, QString::number (cs ));
}
void Addressee::removeID(const QString &prof)
@@ -280,9 +280,8 @@ void Addressee::removeID(const QString &prof)
void Addressee::setID( const QString & prof , const QString & id )
{
detach();
- qDebug("setID1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id );
- qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
+ //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
}
void Addressee::setTempSyncStat( int id )
{
@@ -303,9 +302,9 @@ QString Addressee::getID( const QString & prof)
void Addressee::setCsum( const QString & prof , const QString & id )
{
detach();
- qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
+ //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id );
- qDebug("setcsum2 %s ",mData->mExternalId.latin1() );
+ //qDebug("setcsum2 %s ",mData->mExternalId.latin1() );
}
QString Addressee::getCsum( const QString & prof)
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 56f6af2..fa0c51f 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2552,17 +2552,17 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
bool remCh, locCh;
remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
- if ( remCh )
- qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
+
+ //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
locCh = ( local->revision() > mLastAddressbookSync );
if ( !remCh && ! locCh ) {
- qDebug("both not changed ");
+ //qDebug("both not changed ");
lastSync = local->revision().addDays(1);
if ( mode <= SYNC_PREF_ASK )
return 0;
} else {
if ( locCh ) {
- qDebug("loc changed %s %s", local->revision().toString().latin1(), mLastAddressbookSync.toString().latin1());
+ //qDebug("loc changed %s %s", local->revision().toString().latin1(), mLastAddressbookSync.toString().latin1());
lastSync = local->revision().addDays( -1 );
if ( !remCh )
remote->setRevision( lastSync.addDays( -1 ) );
@@ -2726,7 +2726,7 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
#endif
//qDebug("*************************** ");
- qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() );
+ // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() );
QStringList er = remote->uidList();
Addressee inR ;//= er.first();
Addressee inL;
@@ -2917,7 +2917,7 @@ bool KABCore::syncAB(QString filename, int mode)
AddressBook abLocal(filename,"syncContact");
bool syncOK = false;
if ( abLocal.load() ) {
- qDebug("AB loaded %s mode %d",filename.latin1(), mode );
+ qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode );
bool external = false;
Addressee lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
if ( ! lse.isEmpty() ) {
@@ -2937,7 +2937,7 @@ bool KABCore::syncAB(QString filename, int mode)
}
if ( external ) {
- qDebug("**********Setting vcf mode to external ");
+ qDebug("Setting vcf mode to external ");
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
AddressBook::Iterator it;
for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
@@ -2956,7 +2956,7 @@ bool KABCore::syncAB(QString filename, int mode)
{
if ( external )
abLocal.removeDeletedAddressees();
- qDebug("saving remote AB ");
+ qDebug("Saving remote AB ");
abLocal.saveAB();
}
}