scrsaver/scrsaverplugins/SlideshowPlugin/src/SlideshowPlugin.cpp
branchRCL_3
changeset 27 fc25e03508fd
parent 26 e8d784ac1a4b
child 31 8f536f98e1f8
equal deleted inserted replaced
26:e8d784ac1a4b 27:fc25e03508fd
   132     delete iScreensaverName;
   132     delete iScreensaverName;
   133     delete iSettings;
   133     delete iSettings;
   134     delete iDrmHelper;
   134     delete iDrmHelper;
   135     delete iModel;
   135     delete iModel;
   136 
   136 
   137     // First model, then engine, otherwise bad things happen
   137     // Close and delete mds query
   138     delete iMdESession;
   138     if ( iQuery )
       
   139         {
       
   140         iQuery->Cancel();
       
   141         delete iQuery;
       
   142         iQuery = NULL;
       
   143         }
       
   144 
       
   145 	if ( iMdESession )
       
   146         {
       
   147         delete iMdESession;
       
   148         iMdESession = NULL;
       
   149         }
   139     
   150     
   140     // Logging done
   151     // Logging done
   141     SSPLOGGER_DELETE;
   152     SSPLOGGER_DELETE;
   142     }
   153     }
   143 
   154 
   999     {
  1010     {
  1000     CMdENamespaceDef& defaultNamespaceDef = iMdESession->GetDefaultNamespaceDefL();
  1011     CMdENamespaceDef& defaultNamespaceDef = iMdESession->GetDefaultNamespaceDefL();
  1001     CMdEObjectDef& imageObjDef = defaultNamespaceDef.GetObjectDefL( MdeConstants::Image::KImageObject );
  1012     CMdEObjectDef& imageObjDef = defaultNamespaceDef.GetObjectDefL( MdeConstants::Image::KImageObject );
  1002 
  1013 
  1003     // query objects with object definition "Image"
  1014     // query objects with object definition "Image"
  1004     CMdEObjectQuery* query = iMdESession->NewObjectQueryL( defaultNamespaceDef, imageObjDef, this );
  1015     iQuery = iMdESession->NewObjectQueryL( defaultNamespaceDef, imageObjDef, this );
  1005 
  1016 
  1006     query->FindL( KDefaultRandomLoadingNumber );
  1017     iQuery->FindL( KDefaultRandomLoadingNumber );
  1007     }
  1018     }
  1008 
  1019 
  1009 // -----------------------------------------------------------------------------
  1020 // -----------------------------------------------------------------------------
  1010 // CSlideshowPlugin::HandleSessionError
  1021 // CSlideshowPlugin::HandleSessionError
  1011 // error happened when open the session, close session and end the waiting
  1022 // error happened when open the session, close session and end the waiting