contentstorage/casrv/cawidgetscanner/src/cawidgetstoragehandler.cpp
changeset 87 9d806967057c
parent 85 7feec50967db
child 88 7f0462e8c3da
equal deleted inserted replaced
86:e492551a0d54 87:9d806967057c
   120 void CCaWidgetStorageHandler::UpdateL( const CCaWidgetDescription* aWidget,
   120 void CCaWidgetStorageHandler::UpdateL( const CCaWidgetDescription* aWidget,
   121         TUint aEntryId )
   121         TUint aEntryId )
   122     {
   122     {
   123     CCaInnerEntry* entry = aWidget->GetEntryLC();
   123     CCaInnerEntry* entry = aWidget->GetEntryLC();
   124     entry->SetId( aEntryId );
   124     entry->SetId( aEntryId );
   125     if( !aWidget->IsMissing() )
   125     if( !aWidget->IsMissing() && ( aWidget->GetLibrary() != KNoLibrary ) )
   126         {
   126         {
   127         entry->SetFlags( entry->GetFlags() & ~EUsed );
   127         entry->SetFlags( entry->GetFlags() & ~EUsed );
       
   128         }
       
   129     else if(aWidget->IsUsed())
       
   130         {
       
   131         entry->SetFlags( entry->GetFlags() | EUsed );
   128         }
   132         }
   129     entry->SetFlags( entry->GetFlags() & ~EMissing );
   133     entry->SetFlags( entry->GetFlags() & ~EMissing );
   130     iStorage->AddL( entry );
   134     iStorage->AddL( entry );
   131     if( !aWidget->IsMissing() )
   135     if( !aWidget->IsMissing() )
   132         {
   136         {
   150             {
   154             {
   151             if( !iWidgets[index]->Compare( *aWidgets[i] ) || 
   155             if( !iWidgets[index]->Compare( *aWidgets[i] ) || 
   152                     iWidgets[index]->IsMissing() )
   156                     iWidgets[index]->IsMissing() )
   153                 {
   157                 {
   154                 aWidgets[i]->SetMissing( iWidgets[index]->IsMissing() );
   158                 aWidgets[i]->SetMissing( iWidgets[index]->IsMissing() );
       
   159                 aWidgets[i]->SetUsed( iWidgets[index]->IsUsed() );
   155                 UpdateL( aWidgets[i], iWidgets[index]->GetEntryId() );
   160                 UpdateL( aWidgets[i], iWidgets[index]->GetEntryId() );
   156                 }
   161                 }
   157             iUpdatedIndexes.AppendL( index );
   162             iUpdatedIndexes.AppendL( index );
   158             }
   163             }
   159         else
   164         else
   265 void CCaWidgetStorageHandler::SetMissingFlagL(
   270 void CCaWidgetStorageHandler::SetMissingFlagL(
   266         const CCaWidgetDescription* aWidget )
   271         const CCaWidgetDescription* aWidget )
   267     {
   272     {
   268     CCaInnerEntry* entry = aWidget->GetEntryLC();
   273     CCaInnerEntry* entry = aWidget->GetEntryLC();
   269     entry->SetFlags( entry->GetFlags() | EMissing );
   274     entry->SetFlags( entry->GetFlags() | EMissing );
       
   275     if(aWidget->IsUsed())
       
   276         {
       
   277         entry->SetFlags( entry->GetFlags() | EUsed );
       
   278         }
   270     iStorage->AddL( entry );
   279     iStorage->AddL( entry );
   271     CleanupStack::PopAndDestroy( entry );
   280     CleanupStack::PopAndDestroy( entry );
   272     }
   281     }
   273 
   282 
   274 //  End of File  
   283 //  End of File