ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp
changeset 49 f291796e213d
parent 29 2c833fc9e98f
child 50 a0f57508af73
equal deleted inserted replaced
48:d0b4e67b3a60 49:f291796e213d
    62     }
    62     }
    63 
    63 
    64 void GlxMpxCommandHandler::executeCommand(int commandId, int collectionId,QList<QModelIndex>  indexList)
    64 void GlxMpxCommandHandler::executeCommand(int commandId, int collectionId,QList<QModelIndex>  indexList)
    65     {
    65     {
    66     OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_EXECUTECOMMAND_ENTRY );
    66     OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_EXECUTECOMMAND_ENTRY );
       
    67     Q_UNUSED(indexList);
    67     int aHierarchyId = 0;
    68     int aHierarchyId = 0;
    68     TGlxFilterItemType aFilterType = EGlxFilterImage;
    69     TGlxFilterItemType aFilterType = EGlxFilterImage;
    69 
    70 
    70     if (collectionId != KGlxAlbumsMediaId)
    71     if (collectionId != KGlxAlbumsMediaId)
    71         {
    72         {
   347     if (KErrNone != aErrorCode)
   348     if (KErrNone != aErrorCode)
   348         {
   349         {
   349         // @todo error received. Close progress note 
   350         // @todo error received. Close progress note 
   350         DismissProgressNoteL();
   351         DismissProgressNoteL();
   351         iMediaList->RemoveMediaListObserver(this);
   352         iMediaList->RemoveMediaListObserver(this);
   352 
   353         iMediaList->Close();
       
   354         iMediaList = NULL;
   353         // handle error
   355         // handle error
   354         HandleErrorL(aErrorCode);
   356         HandleErrorL(aErrorCode);
   355         }
   357         }
   356     else if (iProgressComplete)
   358     else if (iProgressComplete)
   357         {
   359         {
   358         DismissProgressNoteL();
   360         DismissProgressNoteL();
   359         iMediaList->RemoveMediaListObserver(this);
   361         iMediaList->RemoveMediaListObserver(this);
       
   362         iMediaList->Close();
       
   363         iMediaList = NULL;
   360         CompletionNoteL();
   364         CompletionNoteL();
   361         iProgressComplete = EFalse;
   365         iProgressComplete = EFalse;
   362         }
   366         }
   363     OstTraceFunctionExit0( GLXMPXCOMMANDHANDLER_TRYEXITL_EXIT );
   367     OstTraceFunctionExit0( GLXMPXCOMMANDHANDLER_TRYEXITL_EXIT );
   364     }
   368     }
   476             const CGlxMedia* media = aMediaList.Item(iterator++).Properties();
   480             const CGlxMedia* media = aMediaList.Item(iterator++).Properties();
   477         
   481         
   478             // noteText has a place for a title string in it
   482             // noteText has a place for a title string in it
   479             const TDesC& itemName = media->ValueText(KMPXMediaGeneralTitle);
   483             const TDesC& itemName = media->ValueText(KMPXMediaGeneralTitle);
   480             QString qtItemName = QString::fromUtf16(itemName.Ptr(),itemName.Length());
   484             QString qtItemName = QString::fromUtf16(itemName.Ptr(),itemName.Length());
   481             qtText.append(QString("%1").arg(qtItemName));
   485             QString localisedString  = qtText.arg(qtItemName);
       
   486             qtText = localisedString;          
   482             }
   487             }
   483             // (else) If error, assume confirmed anyway
   488             // (else) If error, assume confirmed anyway
   484         CleanupStack::PopAndDestroy(attributeContext);
   489         CleanupStack::PopAndDestroy(attributeContext);
   485         HbMessageBox::question(qtText, this, SLOT(messageDialogClose(HbAction*)));  
   490         HbMessageBox::question(qtText, this, SLOT(messageDialogClose(HbAction*)));  
   486         }
   491         }