ipsservices/ipssosplugin/src/ipsplgdeletelocal.cpp
changeset 23 2dc6caa42ec3
parent 0 8466d47a6819
child 64 3533d4323edc
--- a/ipsservices/ipssosplugin/src/ipsplgdeletelocal.cpp	Mon May 03 12:23:15 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgdeletelocal.cpp	Fri May 14 15:41:10 2010 +0300
@@ -42,11 +42,20 @@
 // ----------------------------------------------------------------------------
 // 
 void CIpsPlgDeleteLocal::ConstructL(
-    CMsvEntrySelection& aMessageSelection )
+    CMsvEntrySelection* aMessageSelection )
     {
     FUNC_LOG;
+    //<qmail>
+    // Start cache manager to prune messages
+    //</qmail>
     CImCacheManager::ConstructL();
-    iMessageSelection = aMessageSelection.CopyL();
+    //<qmail>
+    iMessageSelection = new (ELeave) CMsvEntrySelection();
+    for ( TInt i=0; i<aMessageSelection->Count(); i++ )
+        {
+        iMessageSelection->AppendL( aMessageSelection->At(i) );
+        }
+    //</qmail>
     StartL( *iMessageSelection, iObserverRequestStatus );
     }
 
@@ -55,7 +64,7 @@
 // ----------------------------------------------------------------------------
 // 
 CIpsPlgDeleteLocal* CIpsPlgDeleteLocal::NewL(
-    CMsvEntrySelection& aMessageSelection,
+    CMsvEntrySelection* aMessageSelection,
     CMsvSession& aMsvSession,
     TRequestStatus& aObserverRequestStatus)
     {
@@ -89,11 +98,13 @@
 TBool CIpsPlgDeleteLocal::Filter() const
     {
     FUNC_LOG;
-    if ( iMessageSelection->Find( iCurrentEntry->Entry().Id() )
-        > KErrNotFound )
+    //<qmail> 
+    if ( iMessageSelection->Find( 
+            iCurrentEntry->Entry().Id() ) == KErrNone )
         {
         return ETrue;
         }
+    //</qmail>
     return EFalse;
     }