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

List:       kde-commits
Subject:    playground/pim/akonadi/exchange/connector
From:       Shaheed Haque <srhaque () theiet ! org>
Date:       2012-03-08 21:32:05
Message-ID: 20120308213205.C0DADAC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1284479 by shaheed:

Put recipient debug under a debug macro.


 M  +19 -1     mapiconnector2.cpp  


--- trunk/playground/pim/akonadi/exchange/connector/mapiconnector2.cpp \
#1284478:1284479 @@ -49,6 +49,10 @@
 #define DEBUG_MESSAGE_PROPERTIES 0
 #endif
 
+#ifndef DEBUG_RECIPIENTS
+#define DEBUG_RECIPIENTS 0
+#endif
+
 #define STR(def) \
 case def: return QString::fromLatin1(#def)
 
@@ -654,7 +658,9 @@
 
 void MapiMessage::addUniqueRecipient(const char *source, MapiRecipient &candidate)
 {
+#if DEBUG_RECIPIENTS
 	debug() << "candidate address:" << source << candidate.toString();
+#endif
 	if (candidate.name.isEmpty() && candidate.email.isEmpty()) {
 		// Discard garbage.
 		return;
@@ -710,7 +716,9 @@
 	}
 
 	// Add the entry if it did not match.
+#if DEBUG_RECIPIENTS
 	debug() << "add new address:" << source << candidate.toString();
+#endif
 	m_recipients.append(candidate);
 }
 
@@ -1065,7 +1073,9 @@
 			needingResolution << i;
 		}
 	}
+#if DEBUG_RECIPIENTS
 	debug() << "recipients needing primary resolution:" << needingResolution.size() << \
"from a total:" << m_recipients.size(); +#endif
 
 	// Short-circuit exit.
 	if (!needingResolution.size()) {
@@ -1139,7 +1149,9 @@
 	}
 	MAPIFreeBuffer(results);
 	MAPIFreeBuffer(statuses);
+#if DEBUG_RECIPIENTS
 	debug() << "recipients needing secondary resolution:" << needingResolution.size();
+#endif
 
 	// Secondary resolution is to remove entries which have the the same 
 	// email. But we must take care since we'll still have unresolved 
@@ -1177,7 +1189,9 @@
 			}
 		}
 	}
+#if DEBUG_RECIPIENTS
 	debug() << "recipients needing tertiary resolution:" << needingResolution.size();
+#endif
 
 	// Tertiary resolution.
 	//
@@ -1203,9 +1217,13 @@
 	m_recipients.clear();
 	foreach (MapiRecipient recipient, uniqueResolvedRecipients) {
 		m_recipients.append(recipient);
-	error() << "recipient name:" << recipient.toString();
+#if DEBUG_RECIPIENTS
+		debug() << "recipient name:" << recipient.toString();
+#endif
 	}
+#if DEBUG_RECIPIENTS
 	debug() << "recipients after resolution:" << m_recipients.size();
+#endif
 	return true;
 }
 


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

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