ipsservices/ipssosplugin/src/ipsplgdeletelocal.cpp
branchRCL_3
changeset 25 3533d4323edc
parent 24 d189ee25cf9d
--- a/ipsservices/ipssosplugin/src/ipsplgdeletelocal.cpp	Tue Aug 31 15:04:17 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgdeletelocal.cpp	Wed Sep 01 12:28:57 2010 +0100
@@ -42,20 +42,11 @@
 // ----------------------------------------------------------------------------
 // 
 void CIpsPlgDeleteLocal::ConstructL(
-    CMsvEntrySelection* aMessageSelection )
+    CMsvEntrySelection& aMessageSelection )
     {
     FUNC_LOG;
-    //<qmail>
-    // Start cache manager to prune messages
-    //</qmail>
     CImCacheManager::ConstructL();
-    //<qmail>
-    iMessageSelection = new (ELeave) CMsvEntrySelection();
-    for ( TInt i=0; i<aMessageSelection->Count(); i++ )
-        {
-        iMessageSelection->AppendL( aMessageSelection->At(i) );
-        }
-    //</qmail>
+    iMessageSelection = aMessageSelection.CopyL();
     StartL( *iMessageSelection, iObserverRequestStatus );
     }
 
@@ -64,7 +55,7 @@
 // ----------------------------------------------------------------------------
 // 
 CIpsPlgDeleteLocal* CIpsPlgDeleteLocal::NewL(
-    CMsvEntrySelection* aMessageSelection,
+    CMsvEntrySelection& aMessageSelection,
     CMsvSession& aMsvSession,
     TRequestStatus& aObserverRequestStatus)
     {
@@ -98,13 +89,11 @@
 TBool CIpsPlgDeleteLocal::Filter() const
     {
     FUNC_LOG;
-    //<qmail> 
-    if ( iMessageSelection->Find( 
-            iCurrentEntry->Entry().Id() ) == KErrNone )
+    if ( iMessageSelection->Find( iCurrentEntry->Entry().Id() )
+        > KErrNotFound )
         {
         return ETrue;
         }
-    //</qmail>
     return EFalse;
     }