[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [patch] Minor cleanup of debug strings
From:       Brad Hards <bhards () bigpond ! net ! au>
Date:       2003-08-04 12:22:19
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While trying to figure out a few things about kmail, the messiness of the 
debug strings began to annoy me. In particular, there was an ASSERT that I 
kept hitting that indicated no EOL on a debug string.

So I went through and did a bit of a cleanup. If the attached is OK, can it 
please be applied?

Brad
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/Lk/8W6pHgIdAuOMRApxCAJ411pwSOoI6L+tg03bRvvEH5u6QswCfZy6+
wR91Kbne64hC5nyJT/sigGg=
=QKMU
-----END PGP SIGNATURE-----

["endl-20030804.patch" (text/x-diff)]

? autom4te-2.5x.cache
? endl-20030804.patch
? korganizer/knewstuff/ghns
? libical/src/libical/icalrestriction.c
? libical/src/libicalss/icalssyacc.output
? libkdepim/cfgc/Makefile
? libkdepim/cfgc/cfgc
? libksieve/Makefile
? libksieve/ksieve/Makefile
? libksieve/tests/Makefile
Index: kmail/kmailicalifaceimpl.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmailicalifaceimpl.cpp,v
retrieving revision 1.16
diff -u -3 -p -r1.16 kmailicalifaceimpl.cpp
--- kmail/kmailicalifaceimpl.cpp	3 Aug 2003 08:02:59 -0000	1.16
+++ kmail/kmailicalifaceimpl.cpp	4 Aug 2003 12:18:04 -0000
@@ -567,7 +567,7 @@ void KMGroupware::msgRemoved( KMFolder* 
 	emit signalTaskDeleted( uid );
     }
   } else
-    kdDebug(5006) << "%%% Unknown groupware deletion\n";
+    kdDebug(5006) << "%%% Unknown groupware deletion" << endl;
 }
 #endif
 
Index: kmail/kmcomposewin.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmcomposewin.cpp,v
retrieving revision 1.716
diff -u -3 -p -r1.716 kmcomposewin.cpp
--- kmail/kmcomposewin.cpp	3 Aug 2003 15:36:58 -0000	1.716
+++ kmail/kmcomposewin.cpp	4 Aug 2003 12:18:08 -0000
@@ -1195,7 +1195,7 @@ void KMComposeWin::setMsg(KMMessage* new
   //assert(newMsg!=0);
   if(!newMsg)
     {
-      kdDebug(5006) << "KMComposeWin::setMsg() : newMsg == 0!\n" << endl;
+      kdDebug(5006) << "KMComposeWin::setMsg() : newMsg == 0!" << endl;
       return;
     }
   mMsg = newMsg;
@@ -1421,7 +1421,7 @@ bool KMComposeWin::applyChanges(void)
   //assert(mMsg!=0);
   if(!mMsg)
   {
-    kdDebug(5006) << "KMComposeWin::applyChanges() : mMsg == 0!\n" << endl;
+    kdDebug(5006) << "KMComposeWin::applyChanges() : mMsg == 0!" << endl;
     return FALSE;
   }
 
@@ -1722,7 +1722,6 @@ bool KMComposeWin::applyChanges(void)
     bool saveMessagesEncrypted = mSelectedCryptPlug ? \
mSelectedCryptPlug->saveMessagesEncrypted()  : true;
 
-    kdDebug(5006) << "\n\n" << endl;
     kdDebug(5006) << "KMComposeWin::applyChanges(void)  -  Send encrypted=" << \
doEncrypt << "  Store encrypted=" << saveMessagesEncrypted << endl;  // note: The \
following define is specified on top of this file. To compile  //       a less strict \
version of KMail just comment it out there above. @@ -2414,7 +2413,7 @@ bool \
KMComposeWin::processStructuringInf  //assert(mMsg!=0);
   if(!mMsg)
   {
-    kdDebug(5006) << "KMComposeWin::processStructuringInfo() : mMsg == 0!\n" << \
endl; +    kdDebug(5006) << "KMComposeWin::processStructuringInfo() : mMsg == 0!" << \
endl;  return FALSE;
   }
 
@@ -3114,7 +3113,7 @@ QByteArray KMComposeWin::pgpSignedMsg( Q
                     ds += "\"\n\n";
                     ds += "signature length: ";
                     ds += cipherLen;
-                    kdDebug(5006) << ds << endl << endl;
+                    kdDebug(5006) << ds << endl;
                 }
                 signature.assign( ciphertext, cipherLen );
             } else if ( errId == /*GPGME_Canceled*/20 ) {
@@ -3152,7 +3151,7 @@ QByteArray KMComposeWin::pgpSignedMsg( Q
 /* ----------------------------- */
 
 
-    kdDebug(5006) << "\nKMComposeWin::pgpSignedMsg returning from CRYPTPLUG.\n" << \
endl; +    kdDebug(5006) << "\nKMComposeWin::pgpSignedMsg returning from CRYPTPLUG" \
<< endl;  } else
       KMessageBox::sorry(this,
         i18n("<qt>No active Crypto Plug-In could be found.<br><br>"
@@ -3377,7 +3376,7 @@ KMComposeWin::getEncryptionCertificate( 
                                                 &certSize,
                                                 false )
                     && (0 < certSize);
-      kdDebug(5006) << "         keys retrieved successfully: " << findCertsOk << \
"\n" << endl; +      kdDebug(5006) << "         keys retrieved successfully: " << \
                findCertsOk << endl;
       kdDebug(5006) << "findCertificates() 1st try returned " << certificatePtr << \
endl;  if( findCertsOk )
         certificateList.assign( certificatePtr, certSize );
@@ -3409,7 +3408,7 @@ KMComposeWin::getEncryptionCertificate( 
                                       &certSize,
                                       false )
                       && (0 < certSize);
-        kdDebug(5006) << "         keys retrieved successfully: " << findCertsOk << \
"\n" << endl; +        kdDebug(5006) << "         keys retrieved successfully: " << \
                findCertsOk << endl;
         kdDebug(5006) << "findCertificates() 2nd try returned " << certificatePtr << \
endl;  if( findCertsOk )
           certificateList.assign( certificatePtr, certSize );
@@ -5845,7 +5844,7 @@ void KMEdit::del()
 
 void KMEdit::slotMisspelling(const QString &text, const QStringList &lst, unsigned \
int pos)  {
-    kdDebug()<<"void KMEdit::slotMisspelling(const QString &text, const QStringList \
&lst, unsigned int pos) : "<<text <<endl; +    kdDebug()<<"void \
KMEdit::slotMisspelling(const QString &text, const QStringList &lst, unsigned int \
pos) : "<< text << endl;  
      if( spellLineEdit )
          mComposer->sujectLineWidget()->spellCheckerMisspelling( text, lst, pos);
Index: kmail/kmfolderdia.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmfolderdia.cpp,v
retrieving revision 1.108
diff -u -3 -p -r1.108 kmfolderdia.cpp
--- kmail/kmfolderdia.cpp	29 Jul 2003 22:23:54 -0000	1.108
+++ kmail/kmfolderdia.cpp	4 Aug 2003 12:18:08 -0000
@@ -475,7 +475,7 @@ KMFolderDialog::KMFolderDialog(KMFolder 
     mcGroup->hide();
   }
 
-  kdDebug(5006)<<"Exiting KMFolderDialog::KMFolderDialog()\n";
+  kdDebug(5006)<<"Exiting KMFolderDialog::KMFolderDialog()" << endl;
 }
 
 
Index: kmail/kmgroupware.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmgroupware.cpp,v
retrieving revision 1.37
diff -u -3 -p -r1.37 kmgroupware.cpp
--- kmail/kmgroupware.cpp	22 Jul 2003 18:56:44 -0000	1.37
+++ kmail/kmgroupware.cpp	4 Aug 2003 12:18:09 -0000
@@ -667,7 +667,7 @@ void KMGroupware::processVCalRequest( co
     if( rc )
       mMainWin->mainKMWidget()->slotTrashMsg();
   } else
-    kdDebug(5006) << "KOrganizer call failed";
+    kdDebug(5006) << "KOrganizer call failed" << endl;
 
 #if 0
   // step 2: process vCal returned by Organizer
@@ -713,7 +713,7 @@ void KMGroupware::processVCalReply( cons
 {
   VCalType type = getVCalType( vCalIn );
   if( type == vCalUnknown ) {
-    kdDebug(5006) << "processVCalReply called with something that is not a vCal\n";
+    kdDebug(5006) << "processVCalReply called with something that is not a vCal" << \
endl;  return;
   }
 
@@ -728,7 +728,7 @@ void KMGroupware::processVCalReply( cons
 
     // Check for the user stopping this transaction or some error happening
     if( vCalOut == "false" ) {
-      kdDebug(5006) << "Problem in processing the iCal reply\n";
+      kdDebug(5006) << "Problem in processing the iCal reply" << endl;
       ignore_GroupwareDataChangeSlots = false;
       return;
     }
@@ -878,7 +878,7 @@ bool KMGroupware::vPartToHTML( int aUpda
 {
   VCalType type = getVCalType( vCal );
   if( type == vCalUnknown ) {
-    kdDebug(5006) << "Unknown incidence!\n";
+    kdDebug(5006) << "Unknown incidence!" << endl;
     return false;
   }
 
Index: kmail/kmreaderwin.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmreaderwin.cpp,v
retrieving revision 1.689
diff -u -3 -p -r1.689 kmreaderwin.cpp
--- kmail/kmreaderwin.cpp	1 Aug 2003 18:06:43 -0000	1.689
+++ kmail/kmreaderwin.cpp	4 Aug 2003 12:18:11 -0000
@@ -1082,9 +1082,9 @@ void KMReaderWin::parseMsg(KMMessage* aM
 {
 #ifndef NDEBUG
   kdDebug( 5006 )
-    << "\n#######\n#######\n#######  parseMsg(KMMessage* aMsg "
+    << "#######" << endl << "parseMsg(KMMessage* aMsg "
     << ( aMsg == message() ? "==" : "!=" )
-    << " aMsg )\n#######\n#######";
+    << " aMsg )" << endl << "#######" << endl;
 #endif
 
   KMMessagePart msgPart;
@@ -1553,7 +1553,7 @@ void KMReaderWin::slotUrlOpen(const KURL
       KMessageBox::error( this, i18n( "Could not start certificate manager. Please \
check your installation!" ),  i18n( "KMail Error" ) );
     else
-      kdDebug(5006) << "\nKMReaderWin::slotUrlOn(): certificate manager started.\n" \
<< endl; +      kdDebug(5006) << "\nKMReaderWin::slotUrlOn(): certificate manager \
started." << endl;  // process continues to run even after the KProcess object goes
     // out of scope here, since it is started in DontCare run mode.
     return;
Index: kmail/objecttreeparser.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/objecttreeparser.cpp,v
retrieving revision 1.59
diff -u -3 -p -r1.59 objecttreeparser.cpp
--- kmail/objecttreeparser.cpp	3 Aug 2003 16:09:55 -0000	1.59
+++ kmail/objecttreeparser.cpp	4 Aug 2003 12:18:13 -0000
@@ -164,20 +164,20 @@ namespace KMail {
     newNode->buildObjectTree( false );
 
     if ( startNode.mimePartTreeItem() ) {
-      kdDebug(5006) << "\n     ----->  Inserting items into MimePartTree\n" << endl;
+      kdDebug(5006) << "\n     ----->  Inserting items into MimePartTree" << endl;
       newNode->fillMimePartTree( startNode.mimePartTreeItem(), 0,
 				 QString::null, QString::null, QString::null, 0,
 				 append );
-      kdDebug(5006) << "\n     <-----  Finished inserting items into MimePartTree\n" \
<< endl; +      kdDebug(5006) << "\n     <-----  Finished inserting items into \
MimePartTree" << endl;  } else {
       kdDebug(5006) << "\n     ------  Sorry, node.mimePartTreeItem() returns ZERO \
                so"
-		    << "\n                    we cannot insert new lines into MimePartTree. :-(\n" \
<< endl; +		    << "\n                    we cannot insert new lines into \
MimePartTree. :-(" << endl;  }
-    kdDebug(5006) << "\n     ----->  Now parsing the MimePartTree\n" << endl;
+    kdDebug(5006) << "\n     ----->  Now parsing the MimePartTree" << endl;
     ObjectTreeParser otp( mReader, cryptPlugWrapper() );
     otp.parseObjectTree( newNode );
     mResultString += otp.resultString();
-    kdDebug(5006) << "\n     <-----  Finished parsing the MimePartTree in \
insertAndParseNewChildNode()\n" << endl; +    kdDebug(5006) << "\n     <-----  \
Finished parsing the MimePartTree in insertAndParseNewChildNode()" << endl;  }
 
 
@@ -1351,16 +1351,16 @@ QString ObjectTreeParser::byteArrayToTem
 
     if ( data ) {
       if ( data->mChild ) {
-	kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )\n" << endl;
+	kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )" << endl;
 	ObjectTreeParser otp( *this );
 	otp.setShowOnlyOneMimePart( false );
 	otp.parseObjectTree( data->mChild );
 	mResultString += otp.resultString();
 	bDone = true;
-	kdDebug(5006) << "\n----->  Returning from parseObjectTree( curNode->mChild )\n" << \
endl; +	kdDebug(5006) << "\n----->  Returning from parseObjectTree( curNode->mChild \
)" << endl;  }
       else {
-	kdDebug(5006) << "\n----->  Initially processing encrypted data\n" << endl;
+	kdDebug(5006) << "\n----->  Initially processing encrypted data" << endl;
 	PartMetaData messagePart;
 	curNode->setEncryptionState( KMMsgFullyEncrypted );
 	QCString decryptedData;
@@ -1454,14 +1454,14 @@ QString ObjectTreeParser::byteArrayToTem
       return false;
 
     if ( curNode->mChild ) {
-      kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )\n" << \
endl; +      kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )" \
<< endl;  ObjectTreeParser otp( mReader, cryptPlugWrapper() );
       otp.parseObjectTree( curNode->mChild );
       mResultString += otp.resultString();
-      kdDebug(5006) << "\n<-----  Returning from parseObjectTree( curNode->mChild \
)\n" << endl; +      kdDebug(5006) << "\n<-----  Returning from parseObjectTree( \
curNode->mChild )" << endl;  return true;
     }
-    kdDebug(5006) << "\n----->  Initially processing data of embedded RfC 822 \
message\n" << endl; +    kdDebug(5006) << "\n----->  Initially processing data of \
embedded RfC 822 message" << endl;  // paint the frame
     PartMetaData messagePart;
     if ( mReader ) {
@@ -1485,7 +1485,7 @@ QString ObjectTreeParser::byteArrayToTem
     }
     KMMessage rfc822message( rfc822DwMessage );
     curNode->setFromAddress( rfc822message.from() );
-    kdDebug(5006) << "\n----->  Store RfC 822 message header \"From: " << \
rfc822message.from() << "\"\n" << endl; +    kdDebug(5006) << "\n----->  Store RfC \
822 message header \"From: " << rfc822message.from() << "\"" << endl;  if ( mReader )
       htmlWriter()->queue( mReader->writeMsgHeader( &rfc822message ) );
       //mReader->parseMsgHeader( &rfc822message );
@@ -1533,15 +1533,15 @@ QString ObjectTreeParser::byteArrayToTem
 
   bool ObjectTreeParser::processApplicationOctetStreamSubtype( partNode * curNode, \
ProcessResult & result ) {  if ( curNode->mChild ) {
-      kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )\n" << \
endl; +      kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )" \
<< endl;  ObjectTreeParser otp( mReader, cryptPlugWrapper() );
       otp.parseObjectTree( curNode->mChild );
       mResultString += otp.resultString();
-      kdDebug(5006) << "\n<-----  Returning from parseObjectTree( curNode->mChild \
)\n" << endl; +      kdDebug(5006) << "\n<-----  Returning from parseObjectTree( \
curNode->mChild )" << endl;  return true;
     }
 
-    kdDebug(5006) << "\n----->  Initially processing encrypted data\n" << endl;
+    kdDebug(5006) << "\n----->  Initially processing encrypted data" << endl;
     CryptPlugWrapper* oldUseThisCryptPlug = cryptPlugWrapper();
     if (    curNode->mRoot
 	    && DwMime::kTypeMultipart    == curNode->mRoot->type()
@@ -1611,15 +1611,15 @@ QString ObjectTreeParser::byteArrayToTem
 
   bool ObjectTreeParser::processApplicationPkcs7MimeSubtype( partNode * curNode, \
ProcessResult & ) {  if ( curNode->mChild ) {
-      kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )\n" << \
endl; +      kdDebug(5006) << "\n----->  Calling parseObjectTree( curNode->mChild )" \
<< endl;  ObjectTreeParser otp( mReader, cryptPlugWrapper() );
       otp.parseObjectTree( curNode->mChild );
       mResultString += otp.resultString();
-      kdDebug(5006) << "\n<-----  Returning from parseObjectTree( curNode->mChild \
)\n" << endl; +      kdDebug(5006) << "\n<-----  Returning from parseObjectTree( \
curNode->mChild )" << endl;  return true;
     }
 
-    kdDebug(5006) << "\n----->  Initially processing signed and/or encrypted data\n" \
<< endl; +    kdDebug(5006) << "\n----->  Initially processing signed and/or \
encrypted data" << endl;  curNode->setCryptoType( partNode::CryptoTypeSMIME );
     if ( !curNode->dwPart() || !curNode->dwPart()->hasHeaders() )
       return false;



_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic