diff -r a3a4c0de738e -r 0f0f3f26f787 ui/uiengine/model/listmodel/src/glxalbummodel.cpp --- a/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Fri Jul 23 20:41:04 2010 +0530 +++ b/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Fri Aug 06 20:44:25 2010 +0530 @@ -28,7 +28,7 @@ GlxAlbumModel::GlxAlbumModel(GlxModelParm & modelParm):mContextMode(GlxContextInvalid) { qDebug("GlxAlbumModel::GlxAlbumModel()"); - + mSubState = -1; mMLWrapper = new GlxMLWrapper(modelParm.collection(),modelParm.depth(),modelParm.filterType()); // mMLWrapper->setContextMode(GlxContextPtList); // mContextMode = GlxContextPtList; @@ -101,6 +101,10 @@ HbIcon* itemIcon = NULL; QModelIndex idx; + if ( role == GlxSubStateRole ){ + return mSubState; + } + if ( (!index.isValid()) || (rowIndex >= rowCount()) ) { return QVariant(); } @@ -165,6 +169,11 @@ return TRUE; } } + + if ( role == GlxSubStateRole && value.isValid() && value.canConvert ()) { + mSubState = value.value () ; + return TRUE; + } if ( GlxFocusIndexRole == role ) { if ( value.isValid() && value.canConvert () ) { @@ -266,6 +275,7 @@ { qDebug("GlxAlbumModel::itemsAdded %d %d", startIndex, endIndex); beginInsertRows(QModelIndex(), startIndex, endIndex); + itemIconCache.clear(); endInsertRows(); } @@ -273,6 +283,7 @@ { qDebug("GlxAlbumModel::itemsRemoved %d %d", startIndex, endIndex); beginRemoveRows(QModelIndex(), startIndex, endIndex); + itemIconCache.clear(); endRemoveRows(); //emit rowsRemoved(index(startIndex,0), startIndex, endIndex );