messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp
changeset 70 a15d9966050f
parent 52 12db4185673b
--- a/messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp	Thu Sep 02 20:23:03 2010 +0300
+++ b/messagingapp/msgui/unifiedviewer/src/univiewerheadercontainer.cpp	Fri Sep 17 08:28:39 2010 +0300
@@ -247,14 +247,24 @@
         (alias.isEmpty()) ? mHeaderGroupBox->setHeading(from) : mHeaderGroupBox->setHeading(alias);
     }
     else {
-        QString toAddrList = createAddressList(mViewFeeder->toAddressList());
-        QString ccAddrList = createAddressList(mViewFeeder->ccAddressList());
-
-        if (!ccAddrList.isEmpty()) {
-            toAddrList.append(ADDR_LIST_SEPARATOR);
-            toAddrList.append(ccAddrList);
+        ConvergedMessageAddressList addrList;
+        QString headingStr;
+        if ((addrList = mViewFeeder->toAddressList()).count()) {
+            headingStr.append(createAddressList(addrList));
         }
-        mHeaderGroupBox->setHeading(toAddrList);
+        if ((addrList = mViewFeeder->ccAddressList()).count()) {
+            if (!headingStr.isEmpty()) {
+                headingStr.append(ADDR_LIST_SEPARATOR);
+            }
+            headingStr.append(createAddressList(addrList));
+        }
+        if ((addrList = mViewFeeder->bccAddressList()).count()) {
+            if (!headingStr.isEmpty()) {
+                headingStr.append(ADDR_LIST_SEPARATOR);
+            }
+            headingStr.append(createAddressList(addrList));
+        }
+        mHeaderGroupBox->setHeading(headingStr);
     }
 }