author | zautrix <zautrix> | 2004-10-09 15:58:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-09 15:58:52 (UTC) |
commit | b80a099d9432bdc3d4eea778b1813b82b2680ecf (patch) (side-by-side diff) | |
tree | 6327321f86070a13969b07e25b9cf84d4ad10d13 | |
parent | ed1eac5e36e675b030cb5a5aa90fb2d44eb40c73 (diff) | |
download | kdepimpi-b80a099d9432bdc3d4eea778b1813b82b2680ecf.zip kdepimpi-b80a099d9432bdc3d4eea778b1813b82b2680ecf.tar.gz kdepimpi-b80a099d9432bdc3d4eea778b1813b82b2680ecf.tar.bz2 |
removed some debug output
-rw-r--r-- | kabc/vcardformatplugin.cpp | 2 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 24 | ||||
-rw-r--r-- | microkde/kconfig.cpp | 4 | ||||
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 2 | ||||
-rw-r--r-- | microkde/kdeui/kactioncollection.cpp | 5 | ||||
-rw-r--r-- | microkde/kdeui/klistview.cpp | 2 |
6 files changed, 18 insertions, 21 deletions
diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp index bc18690..8db8c11 100644 --- a/kabc/vcardformatplugin.cpp +++ b/kabc/vcardformatplugin.cpp @@ -28,33 +28,33 @@ VCardFormatPlugin::VCardFormatPlugin() mImpl = new VCardFormatImpl; } VCardFormatPlugin::~VCardFormatPlugin() { delete mImpl; } bool VCardFormatPlugin::load( Addressee &addressee, QFile *file ) { qDebug("VCardFormatPlugin::load"); return mImpl->load( addressee, file ); } bool VCardFormatPlugin::loadAll( AddressBook *addressBook, Resource *resource, QFile *file ) { - qDebug("VCardFormatPlugin::loadAll"); + // qDebug("VCardFormatPlugin::loadAll"); return mImpl->loadAll( addressBook, resource, file ); } void VCardFormatPlugin::save( const Addressee &addressee, QFile *file ) { qDebug("VCardFormatPlugin::save"); mImpl->save( addressee, file ); } void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file ) { qDebug("VCardFormatPlugin::saveAll"); mImpl->saveAll( addressBook, resource, file ); } bool VCardFormatPlugin::checkFormat( QFile *file ) const diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 80fb147..df53235 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -561,61 +561,61 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) int fi; if ( (fi = preCommand.find("$PWD$")) > 0 ) { QString pwd = getPassword(); preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 ); } int maxlen = 30; if ( QApplication::desktop()->width() > 320 ) maxlen += 25; mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); int fileSize = 0; int result = system ( preCommand ); // 0 : okay // 256: no such file or dir // - qDebug("KO: Remote copy result(0 = okay): %d ",result ); + qDebug("Sync: Remote copy result(0 = okay): %d ",result ); if ( result != 0 ) { unsigned int len = maxlen; while ( len < preCommand.length() ) { preCommand.insert( len , "\n" ); len += maxlen +2; } question = i18n("Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n").arg (preCommand) ; QMessageBox::information( mParent, i18n("Sync - ERROR"), question, i18n("Okay!")) ; mParent->topLevelWidget()->setCaption ("KDE-Pim"); return; } mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) ); //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() ); if ( syncWithFile( localTempFile, true ) ) { if ( mWriteBackFile ) { int fi; if ( (fi = postCommand.find("$PWD$")) > 0 ) { QString pwd = getPassword(); postCommand = postCommand.left( fi )+ pwd + postCommand.mid( fi+5 ); } mParent->topLevelWidget()->setCaption ( i18n( "Writing back file ..." ) ); result = system ( postCommand ); - qDebug("Writing back file result: %d ", result); + qDebug("Sync:Writing back file result: %d ", result); if ( result != 0 ) { mParent->topLevelWidget()->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) ); return; } else { mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) ); } } } return; } void KSyncManager::edit_pisync_options() { QDialog dia( mParent, "dia", true ); dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); QVBoxLayout lay ( &dia ); lay.setSpacing( 5 ); @@ -732,44 +732,44 @@ void KSyncManager::confSync() sp->usrReadConfig(); #ifndef DESKTOP_VERSION sp->showMaximized(); #else sp->show(); #endif sp->exec(); mSyncProfileNames = sp->getSyncProfileNames(); mLocalMachineName = sp->getLocalMachineName (); QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); } void KSyncManager::syncSharp() { if ( ! syncExternalApplication("sharp") ) - qDebug("ERROR sync sharp ");; + qDebug("ERROR sync sharp "); } bool KSyncManager::syncExternalApplication(QString resource) { emit save(); if ( mAskForPreferences ) edit_sync_options(); - qDebug("sync %s", resource.latin1()); + qDebug("Sync extern %s", resource.latin1()); bool syncOK = mImplementation->syncExternal(this, resource); return syncOK; } void KSyncManager::syncPhone() { syncExternalApplication("phone"); } void KSyncManager::showProgressBar(int percentage, QString caption, int total) { @@ -825,65 +825,62 @@ void KSyncManager::syncPi() if ( mAskForPreferences ) edit_pisync_options(); bool ok; Q_UINT16 port = mActiveSyncPort.toUInt(&ok); if ( ! ok ) { mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); return; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, port, mActiveSyncIP, this ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); mParent->topLevelWidget()->setCaption( i18n("Sending request for remote file ...") ); commandSocket->readFile( syncFileName() ); } void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) { - qDebug("MainWindow::deleteCommandSocket %d", state); - //enum { success, errorW, errorR, quiet }; if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) { mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); delete s; if ( state == KCommandSocket::errorR ) { KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); commandSocket->sendStop(); } return; } else if ( state == KCommandSocket::errorW ) { mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); } else if ( state == KCommandSocket::successR ) { QTimer::singleShot( 1, this , SLOT ( readFileFromSocket())); } else if ( state == KCommandSocket::successW ) { mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); } delete s; } void KSyncManager::readFileFromSocket() { QString fileName = syncFileName(); mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); if ( ! syncWithFile( fileName , true ) ) { mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); - qDebug("Syncing failed "); return; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); if ( mWriteBackFile ) commandSocket->writeFile( fileName ); else { commandSocket->sendStop(); mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); } } KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) { mPassWord = pw; mSocket = 0; @@ -909,84 +906,83 @@ void KServerSocket::discardClient() { //qDebug(" KServerSocket::discardClient()"); if ( mSocket ) { delete mSocket; mSocket = 0; } //emit endConnect(); } void KServerSocket::readClient() { if ( blockRC ) return; if ( mSocket == 0 ) { qDebug("ERROR::KServerSocket::readClient(): mSocket == 0 "); return; } - qDebug("KServerSocket readClient()"); + //qDebug("KServerSocket::readClient()"); if ( mSocket->canReadLine() ) { QString line = mSocket->readLine(); - qDebug("KServerSocket readline: %s ", line.latin1()); + //qDebug("KServerSocket readline: %s ", line.latin1()); QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line ); if ( tokens[0] == "GET" ) { if ( tokens[1] == mPassWord ) //emit sendFile( mSocket ); send_file(); else { KMessageBox::error( 0, i18n("Got send file request\nwith invalid password")); - qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); + //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); } } if ( tokens[0] == "PUT" ) { if ( tokens[1] == mPassWord ) { //emit getFile( mSocket ); blockRC = true; get_file(); } else { KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password")); - qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); + //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); } } if ( tokens[0] == "STOP" ) { //emit endConnect(); end_connect(); } } } void KServerSocket::end_connect() { delete mSyncActionDialog; mSyncActionDialog = 0; } void KServerSocket::send_file() { //qDebug("MainWindow::sendFile(QSocket* s) "); if ( mSyncActionDialog ) delete mSyncActionDialog; mSyncActionDialog = new QDialog ( 0, "input-dialog", true ); mSyncActionDialog->setCaption(i18n("Received sync request")); QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); lay->addWidget( label); lay->setMargin(7); lay->setSpacing(7); mSyncActionDialog->setFixedSize( 230, 120); mSyncActionDialog->show(); mSyncActionDialog->raise(); - qDebug("KSS::saving ... "); emit request_file(); qApp->processEvents(); QString fileName = mFileName; QFile file( fileName ); if (!file.open( IO_ReadOnly ) ) { delete mSyncActionDialog; mSyncActionDialog = 0; qDebug("KSS::error open file "); mSocket->close(); if ( mSocket->state() == QSocket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); return ; } mSyncActionDialog->setCaption( i18n("Sending file...") ); QTextStream ts( &file ); @@ -1023,33 +1019,33 @@ void KServerSocket::readBackFileFromSocket() piFileString += line; //qDebug("readline: %s ", line.latin1()); mSyncActionDialog->setCaption( i18n("Received %1 bytes").arg( piFileString.length() ) ); } if ( piTime.elapsed () < 3000 ) { // wait for more //qDebug("waitformore "); QTimer::singleShot( 100, this , SLOT (readBackFileFromSocket( ) )); return; } QString fileName = mFileName; QFile file ( fileName ); if (!file.open( IO_WriteOnly ) ) { delete mSyncActionDialog; mSyncActionDialog = 0; - qDebug("error open cal file "); + qDebug("KSS:Error open read back file "); piFileString = ""; emit file_received( false ); blockRC = false; return ; } // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); QTextStream ts ( &file ); ts.setEncoding( QTextStream::Latin1 ); mSyncActionDialog->setCaption( i18n("Writing file to disk...") ); ts << piFileString; mSocket->close(); if ( mSocket->state() == QSocket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); file.close(); @@ -1156,33 +1152,33 @@ void KCommandSocket::readFileFromSocket() mTime.restart(); QString line = mSocket->readLine (); mFileString += line; //qDebug("readline: %s ", line.latin1()); } if ( mTime.elapsed () < 3000 ) { // wait for more //qDebug("waitformore "); QTimer::singleShot( 100, this , SLOT (readFileFromSocket( ) )); return; } QString fileName = mFileName; QFile file ( fileName ); if (!file.open( IO_WriteOnly ) ) { mFileString = ""; mRetVal = errorR; - qDebug("Error open temp calender file for writing: %s",fileName.latin1() ); + qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() ); deleteSocket(); return ; } // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); QTextStream ts ( &file ); ts.setEncoding( QTextStream::Latin1 ); ts << mFileString; file.close(); mFileString = ""; mRetVal = successR; mSocket->close(); // if state is not idle, deleteSocket(); is called via // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); if ( mSocket->state() == QSocket::Idle ) deleteSocket(); diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index ba41f6c..5b685d3 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp @@ -256,34 +256,34 @@ void KConfig::writeEntry( const QString & e , const QFont & f ) font.append( QString::number ( f.pointSize () ) ); font.append( !f.italic ()?"nonitalic":"italic" ); writeEntry( e, font ); } void KConfig::writeEntry( const QString &key, const QDateTime &dt ) { mDateTimeMap.insert( mGroup + key, dt ); } void KConfig::load() { QFile f( mFileName ); if ( !f.open( IO_ReadOnly ) ) { - qDebug("KConfig: could not open file %s ",mFileName.latin1() ); - return; + //qDebug("KConfig: could not open file %s ",mFileName.latin1() ); + return; } mBoolMap.clear(); mStringMap.clear(); QTextStream t( &f ); QString line = t.readLine(); while ( !line.isNull() ) { QStringList tokens = QStringList::split( ",", line ); if ( tokens[0] == "bool" ) { bool value = false; if ( tokens[2] == "1" ) value = true; mBoolMap.insert( tokens[1], value ); } else if ( tokens[0] == "QString" ) { diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index 1c3e0ae..4c03c15 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp @@ -1543,33 +1543,33 @@ QString locate( const char *type, return KGlobal::dirs()->findResource(type, filename); } QString locateLocal( const char *type, const QString& filename/*US , const KInstance* inst*/ ) { QString path = locateLocal(type, filename, true /*US, inst*/); /* static int ccc = 0; ++ccc; if ( ccc > 13 ) abort(); */ - qDebug("locatelocal: %s" , path.latin1()); + //qDebug("locatelocal: %s" , path.latin1()); return path; /*US why do we put all files into one directory. It is quit complicated. why not staying with the original directorystructure ? QString escapedFilename = filename; escapedFilename.replace( QRegExp( "/" ), "_" ); QString path = KStandardDirs::appDir() + type + "_" + escapedFilename; kdDebug() << "locate: '" << path << "'" << endl; qDebug("locate: %s" , path.latin1()); return path; */ //US so my proposal is this: diff --git a/microkde/kdeui/kactioncollection.cpp b/microkde/kdeui/kactioncollection.cpp index b819e76..69e5d02 100644 --- a/microkde/kdeui/kactioncollection.cpp +++ b/microkde/kdeui/kactioncollection.cpp @@ -140,37 +140,38 @@ KActionCollection::~KActionCollection() } //US delete d->m_kaccel; //US delete d->m_builderKAccel; delete d; d = 0; } void KActionCollection::setWidget( QWidget* w ) { //if ( d->m_actionDict.count() > 0 ) { // kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; // kdDebug(129) << kdBacktrace() << endl; //} //else if ( !d->m_widget ) { d->m_widget = w; - qDebug("KActionCollection::setWidget: warning: KAccel is never used in microkde"); + //qDebug("KActionCollection::setWidget: warning: KAccel is never used in microkde"); //US d->m_kaccel = new KAccel( w, this, "KActionCollection-KAccel" ); } else if ( d->m_widget != w ) - kdWarning(129) << "KActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; + ; + } void KActionCollection::setAutoConnectShortcuts( bool b ) { d->m_bAutoConnectShortcuts = b; } bool KActionCollection::isAutoConnectShortcuts() { return d->m_bAutoConnectShortcuts; } bool KActionCollection::addDocCollection( KActionCollection* pDoc ) { d->m_docList.append( pDoc ); return true; diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp index b53a88a..2856f2d 100644 --- a/microkde/kdeui/klistview.cpp +++ b/microkde/kdeui/klistview.cpp @@ -502,33 +502,33 @@ void KListView::slotOnItem( QListViewItem *item ) d->autoSelect.start( d->autoSelectDelay, true ); d->pCurrentItem = item; } } void KListView::slotOnViewport() { if ( d->bChangeCursorOverItem ) viewport()->unsetCursor(); d->autoSelect.stop(); d->pCurrentItem = 0L; } void KListView::slotSettingsChanged(int category) { -qDebug("KListView::slotSettingsChanged has to be verified"); + //qDebug("KListView::slotSettingsChanged has to be verified"); /*US switch (category) { case KApplication::SETTINGS_MOUSE: d->dragDelay = KGlobalSettings::dndEventDelay(); d->bUseSingle = KGlobalSettings::singleClick(); disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int))); if( d->bUseSingle ) connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int))); d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon(); |