diff -r 85a88bc05e45 -r ffb2d5dd62e9 imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagprocessor.cpp --- a/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagprocessor.cpp Tue Apr 27 16:57:55 2010 +0300 +++ b/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagprocessor.cpp Tue May 11 16:30:11 2010 +0300 @@ -295,7 +295,7 @@ delete iQueryAllItems; iQueryAllItems = NULL; } - else if(&aQuery == iQuery ) + else if(&aQuery == iQuery ) { TN_DEBUG1( "CThumbAGProcessor::HandleQueryCompleted - Query completed"); @@ -318,7 +318,7 @@ TInt itemIndex(KErrNotFound); - //search delta items + //search delta items which were queried, but not found for(TInt queryItem =0; queryItem < iQueryQueue.Count();queryItem++) { TBool found(EFalse); @@ -369,7 +369,8 @@ } else { - DeleteAndCancelQuery(); + //Delete and cancel query, do not return items back to original queue + DeleteAndCancelQuery( EFalse ); TN_DEBUG1( "CThumbAGProcessor::HandleQueryCompleted() Query FAILED!"); } } @@ -664,6 +665,7 @@ } } + // 9.2 specific if( !(imageObjectDef.Id() == aObject->Def().Id() || videoObjectDef.Id() == aObject->Def().Id()) ) { TN_DEBUG1( "CThumbAGProcessor::CreateThumbnailsL() 1st round and not image or video, skip"); @@ -1030,7 +1032,8 @@ //force is coming, but executing non-forced query complete-> cancel old else { - DeleteAndCancelQuery(); + //cancel query and move items back to original processing queue + DeleteAndCancelQuery( ETrue ); ActivateAO(); return; } @@ -1048,9 +1051,11 @@ //waiting for MDS query to complete else if( iQueryActive ) { + //state mismatch if(iForceRun && !iModify) { - DeleteAndCancelQuery(); + //cancel query and move items back to original processing queue + DeleteAndCancelQuery(ETrue); ActivateAO(); } else @@ -1126,7 +1131,7 @@ // CThumbAGProcessor::DeleteAndCancelQuery() // --------------------------------------------------------------------------- // -void CThumbAGProcessor::DeleteAndCancelQuery() +void CThumbAGProcessor::DeleteAndCancelQuery(TBool aRestoreItems) { TN_DEBUG1( "CThumbAGProcessor::DeleteAndCancelQuery() in" ); @@ -1145,7 +1150,7 @@ //move remainig IDs in query queue back to original queue while(iQueryQueue.Count()) { - if(iLastQueue) + if(aRestoreItems && iLastQueue) { if(iLastQueue->FindInOrder(iQueryQueue[0], Compare) == KErrNotFound) { @@ -1794,7 +1799,7 @@ //cancel 2nd round generarion when there is items in 1st round queues if(itemsLeft && i2ndRound) { - DeleteAndCancelQuery(); + DeleteAndCancelQuery(ETrue); i2ndRound = EFalse; }