author | zautrix <zautrix> | 2004-12-05 13:41:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-12-05 13:41:41 (UTC) |
commit | 06bebf5be01898145c4f721a8d002519141e7f3b (patch) (side-by-side diff) | |
tree | bc44d996a58a63de8c43cb5ba54d55bf1494eb5c | |
parent | 5ab47964d8b52897bb0662ef4a5fcf9604acaf6c (diff) | |
download | kdepimpi-06bebf5be01898145c4f721a8d002519141e7f3b.zip kdepimpi-06bebf5be01898145c4f721a8d002519141e7f3b.tar.gz kdepimpi-06bebf5be01898145c4f721a8d002519141e7f3b.tar.bz2 |
added better debug output to sync file problems
-rw-r--r-- | kaddressbook/kabcore.cpp | 8 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 15cab73..b7edccd 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1791,13 +1791,15 @@ void KABCore::initGUI() syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); syncManager->setBlockSave(false); connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); - syncManager->setDefaultFileName( sentSyncFile()); + QString sync_file = sentSyncFile(); + qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); + syncManager->setDefaultFileName( sync_file ); //connect(syncManager , SIGNAL( ), this, SLOT( ) ); #endif //KAB_EMBEDDED initActions(); #ifdef KAB_EMBEDDED @@ -3003,12 +3005,14 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo bool KABCore::sync(KSyncManager* manager, QString filename, int mode) { //pending prepare addresseeview for output //pending detect, if remote file has REV field. if not switch to external sync mGlobalSyncMode = SYNC_MODE_NORMAL; + if ( manager != syncManager ) + qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); AddressBook abLocal(filename,"syncContact"); bool syncOK = false; if ( abLocal.load() ) { qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); @@ -3070,12 +3074,14 @@ void KABCore::removeSyncInfo( QString syncProfile) //this is a overwritten callbackmethods from the syncinterface bool KABCore::syncExternal(KSyncManager* manager, QString resource) { if ( resource == "phone" ) return syncPhone(); disableBR( true ); + if ( manager != syncManager ) + qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); AddressBook abLocal( resource,"syncContact"); bool syncOK = false; if ( abLocal.load() ) { qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index c12ba1c..7c53948 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -397,13 +397,13 @@ void KSyncManager::enableQuick( bool ask ) if ( ! ok ) { KMessageBox::information( 0, i18n("No valid port")); return; } //qDebug("port %d ", port); mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); - mServerSocket->setFileName( defaultFileName() ); + mServerSocket->setFileName( defaultFileName() );//bbb //qDebug("connected "); if ( !mServerSocket->ok() ) { KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); delete mServerSocket; mServerSocket = 0; return; @@ -1234,13 +1234,13 @@ void KServerSocket::send_file() qApp->processEvents(); QString fileName = mFileName; QFile file( fileName ); if (!file.open( IO_ReadOnly ) ) { delete mSyncActionDialog; mSyncActionDialog = 0; - qDebug("KSS::error open file "); + qDebug("KSS::error open sync file: %s ", fileName.latin1()); mSocket->close(); if ( mSocket->state() == QSocket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); return ; } |