--- a/emailservices/emailcommon/src/CFSMailBox.cpp Wed Sep 15 17:47:19 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailBox.cpp Thu Sep 30 11:43:07 2010 +0300
@@ -31,7 +31,7 @@
#include "CFSMailFolder.h"
#include "CFSMailAddress.h"
// </qmail>
-#include <emailmru.h>
+#include "emailmru.h"
// ================= MEMBER FUNCTIONS ==========================================
@@ -69,9 +69,6 @@
// get requesthandler pointer
iRequestHandler = static_cast<CFSMailRequestHandler*>(Dll::Tls());
- QT_TRYCATCH_LEAVING({
- iMru = new EmailMRU();
- });
}
// -----------------------------------------------------------------------------
@@ -82,9 +79,7 @@
NM_FUNCTION;
// <qmail> Not using KMailboxExtMrCalInfo </qmail>
iFolders.ResetAndDestroy();
- QT_TRYCATCH_LEAVING({
delete iMru;
- });
}
// -----------------------------------------------------------------------------
@@ -94,6 +89,10 @@
{
NM_FUNCTION;
+ QT_TRYCATCH_LEAVING({
+ iMru = new EmailMRU();
+ });
+
// <qmail>
CFSMailBoxBase::ConstructL(aMailBoxId);
// </qmail>
@@ -431,9 +430,9 @@
if(CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid(GetId()))
{
- UpdateMrusL( aMessage.GetToRecipients(),
- aMessage.GetCCRecipients(),
- aMessage.GetBCCRecipients() );
+ UpdateMrus( aMessage.GetToRecipients() );
+ UpdateMrus( aMessage.GetCCRecipients() );
+ UpdateMrus( aMessage.GetBCCRecipients() );
plugin->SendMessageL( aMessage );
}
}
@@ -454,10 +453,9 @@
if ( plugin )
{
- UpdateMrusL( aMessage.GetToRecipients(),
- aMessage.GetCCRecipients(),
- aMessage.GetBCCRecipients() );
-
+ UpdateMrus( aMessage.GetToRecipients() );
+ UpdateMrus( aMessage.GetCCRecipients() );
+ UpdateMrus( aMessage.GetBCCRecipients() );
// init asynchronous request
request = iRequestHandler->InitAsyncRequestL( GetId().PluginId(),
@@ -697,17 +695,16 @@
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
-// CFSMailBox::UpdateMrusL
+// CFSMailBox::UpdateMrus
// -----------------------------------------------------------------------------
-void CFSMailBox::UpdateMrusL(
- const RPointerArray<CFSMailAddress>& aRecipients,
- const RPointerArray<CFSMailAddress>& aCCRecipients,
- const RPointerArray<CFSMailAddress>& aBCCRecipients ) const
+void CFSMailBox::UpdateMrus(
+ const RPointerArray<CFSMailAddress>& aRecipients ) const
{
NM_FUNCTION;
QT_TRYCATCH_LEAVING({
- TUint count( aRecipients.Count() );
+
+ TUint count( aRecipients.Count() );
TUint indexer( 0 );
while ( indexer < count )
{
@@ -718,31 +715,6 @@
iMru->updateMRU(qname, qaddress);
indexer++;
}
-
- count = aCCRecipients.Count();
- indexer = 0 ;
- while ( indexer < count )
- {
- TDesC& address(aCCRecipients[indexer]->GetEmailAddress() );
- TDesC& name(aCCRecipients[indexer]->GetDisplayName() );
- QString qaddress = QString::fromUtf16(address.Ptr(), address.Length());
- QString qname = QString::fromUtf16(name.Ptr(), name.Length());
- iMru->updateMRU(qname, qaddress);
- indexer++;
- }
-
- count = aBCCRecipients.Count();
- indexer = 0 ;
- while ( indexer < count )
- {
- TDesC& address(aBCCRecipients[indexer]->GetEmailAddress() );
- TDesC& name(aBCCRecipients[indexer]->GetDisplayName() );
- QString qaddress = QString::fromUtf16(address.Ptr(), address.Length());
- QString qname = QString::fromUtf16(name.Ptr(), name.Length());
- iMru->updateMRU(qname, qaddress);
- indexer++;
- }
-
});
}