mpserviceplugins/mpxsqlitedbhgplugin/src/mpxdbabstractalbum.cpp
changeset 29 8192e5b5c935
parent 25 3ec52facab4d
child 38 b93f525c9244
equal deleted inserted replaced
25:3ec52facab4d 29:8192e5b5c935
   250 // ----------------------------------------------------------------------------
   250 // ----------------------------------------------------------------------------
   251 // CMPXDbAbstractAlbum::HandleTNL
   251 // CMPXDbAbstractAlbum::HandleTNL
   252 // ----------------------------------------------------------------------------
   252 // ----------------------------------------------------------------------------
   253 //
   253 //
   254 void CMPXDbAbstractAlbum::HandleTNL( const TDesC& aOldPath,
   254 void CMPXDbAbstractAlbum::HandleTNL( const TDesC& aOldPath,
   255         const TDesC& aNewPath, TInt aPriority )
   255         const TDesC& aNewPath, TInt /*aPriority*/ )
   256   {
   256   {
   257   MPX_FUNC("CMPXDbAbstractAlbum::HandleTNL");
   257   MPX_FUNC("CMPXDbAbstractAlbum::HandleTNL");
   258 
   258 
   259   if (aNewPath.Compare(KNullDesC)==0 && aOldPath.Compare(KNullDesC)!=0)
   259   if (aNewPath.Compare(KNullDesC)==0 && aOldPath.Compare(KNullDesC)!=0)
   260       {         
   260       {         
   322     {
   322     {
   323     MPX_FUNC("CMPXDbAbstractAlbum::GetUriL");
   323     MPX_FUNC("CMPXDbAbstractAlbum::GetUriL");
   324 
   324 
   325     RSqlStatement recordset(GetCategoryRecordL(aId));
   325     RSqlStatement recordset(GetCategoryRecordL(aId));
   326     CleanupClosePushL(recordset);
   326     CleanupClosePushL(recordset);
   327 
   327     HBufC* uri = NULL;
   328     if (recordset.Next() != KSqlAtRow)
   328     if (recordset.Next() == KSqlAtRow)
   329         {
   329         {
   330         User::LeaveIfError(KErrNotFound);
   330         uri = MPXDbCommonUtil::GetColumnTextL(recordset, EAbstractAlbumUri).AllocL();     
   331         }
   331         }
   332     HBufC* uri = MPXDbCommonUtil::GetColumnTextL(recordset, EAbstractAlbumUri).AllocL();
   332     else
   333     CleanupStack::PopAndDestroy(&recordset);
   333         {
       
   334         //entry is deleted due to garbage collection 
       
   335         MPX_DEBUG1("CMPXDbAbstractAlbum::GetUriL, no uri, entry is deleted due to garbage collection"); 
       
   336         TPtrC nullUri(KNullDesC);
       
   337         uri = nullUri.AllocL();
       
   338         }
       
   339     CleanupStack::PopAndDestroy(&recordset);    
   334     return uri;
   340     return uri;
   335     }
   341     }
   336 
   342 
   337 
   343 
   338 // ----------------------------------------------------------------------------
   344 // ----------------------------------------------------------------------------