From c3ec0a5a43fb328f2d190b8adee1ef662746fb41 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 26 Jan 2005 00:32:18 +0000 Subject: debug fixes --- (limited to 'kaddressbook/kabcore.cpp') diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 590cc82..ae0a068 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -427,7 +427,7 @@ KABCore::~KABCore() } void KABCore::receive( const QCString& cmsg, const QByteArray& data ) { - qDebug("KA: QCOP message received: %s ", cmsg.data() ); + //qDebug("KA: QCOP message received: %s ", cmsg.data() ); if ( cmsg == "setDocument(QString)" ) { QDataStream stream( data, IO_ReadOnly ); QString fileName; @@ -442,13 +442,13 @@ void KABCore::toggleBeamReceive( ) return; #ifndef DESKTOP_VERSION if ( infrared ) { - qDebug("AB disable BeamReceive "); + qDebug("KA: AB disable BeamReceive "); delete infrared; infrared = 0; mActionBR->setChecked(false); return; } - qDebug("AB enable BeamReceive "); + qDebug("KA: AB enable BeamReceive "); mActionBR->setChecked(true); infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; @@ -568,7 +568,7 @@ void KABCore::saveSettings() KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); KABPrefs::instance()->writeConfig(); - qDebug("KABCore::saveSettings() "); + qDebug("KA: KABCore::saveSettings() "); } KABC::AddressBook *KABCore::addressBook() const @@ -906,7 +906,7 @@ void KABCore::writeToPhone( ) if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) message(i18n("Export to phone finished!")); else - qDebug(i18n("Error exporting to phone")); + qDebug(i18n("KA: Error exporting to phone")); } void KABCore::beamVCard() { @@ -977,7 +977,7 @@ void KABCore::beamVCard(const QStringList& uids) connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); ir->send( fileName, description, "text/x-vCard" ); } else { - qDebug("Error open temp beam file "); + qDebug("KA: Error open temp beam file "); return; } #endif @@ -2684,7 +2684,7 @@ KABC::Addressee KABCore::getLastSyncAddressee() //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); if (lse.isEmpty()) { - qDebug("Creating new last-syncAddressee "); + qDebug("KA: Creating new last-syncAddressee "); lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); QString sum = ""; if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) @@ -2718,8 +2718,8 @@ 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() ); + //if ( remCh ) + // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); locCh = ( localMod > mLastAddressbookSync ); //qDebug("cahnged rem %d loc %d",remCh, locCh ); if ( !remCh && ! locCh ) { @@ -2856,14 +2856,14 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo // remote->removeSyncInfo( QString());//remove all info if ( KSyncManager::mRequestedSyncEvent.isValid() ) { mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; - qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); + qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); } else { - qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); + qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); } } QDateTime modifiedCalendar = mLastAddressbookSync; addresseeLSync = getLastSyncAddressee(); - qDebug("Last Sync %s ", addresseeLSync.revision().toString().latin1()); + qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); if ( !addresseeR.isEmpty() ) { addresseeRSync = addresseeR; @@ -3125,7 +3125,7 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo if ( syncManager->mShowSyncSummary ) { if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, i18n("KA/Pi Synchronization"),i18n("Write back"))) { - qDebug("cancelled "); + qDebug("KA: WB cancelled "); return false; } } @@ -3147,7 +3147,7 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) AddressBook abLocal(filename,"syncContact"); bool syncOK = false; if ( abLocal.load() ) { - qDebug("Sync:AB loaded %s,sync mode %d",filename.latin1(), mode ); + qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); bool external = false; bool isXML = false; if ( filename.right(4) == ".xml") { @@ -3157,7 +3157,7 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) } else { external = !manager->mIsKapiFile; if ( external ) { - qDebug("Sync:Setting vcf mode to external "); + qDebug("KA: Sync::Setting vcf mode to external "); mGlobalSyncMode = SYNC_MODE_EXTERNAL; AddressBook::Iterator it; for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { @@ -3177,9 +3177,9 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) { if ( external ) abLocal.removeSyncAddressees( !isXML); - qDebug("Sync:Saving remote AB "); + qDebug("KA: Sync::Saving remote AB "); if ( ! abLocal.saveAB()) - qDebug("Error writing back AB to file "); + qDebug("KA: sync::Error writing back AB to file "); if ( external ) { // afterwrite processing abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); @@ -3197,7 +3197,7 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) } void KABCore::removeSyncInfo( QString syncProfile) { - qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); + qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); mAddressBook->removeSyncInfo( syncProfile ); setModified(); } @@ -3217,7 +3217,7 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) bool syncOK = false; message(i18n("Loading DTM address data..."), false); if ( abLocal.load() ) { - qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); + qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); mGlobalSyncMode = SYNC_MODE_EXTERNAL; message(i18n("Sync preprocessing..."),false); abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); @@ -3265,7 +3265,7 @@ bool KABCore::syncPhone() bool syncOK = false; { abLocal.importFromFile( fileName ); - qDebug("AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); + qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); mGlobalSyncMode = SYNC_MODE_EXTERNAL; abLocal.preparePhoneSync( mCurrentSyncDevice, true ); abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); -- cgit v0.9.0.2