videocollection/videocollectionwrapper/src/videolistdatamodel_p.cpp
changeset 49 824471cb468a
parent 41 229f037ce963
child 50 21fe8338c6bf
equal deleted inserted replaced
44:518105d52e45 49:824471cb468a
    13 *
    13 *
    14 * Description: VideoListDataModelPrivate class implementation
    14 * Description: VideoListDataModelPrivate class implementation
    15 * 
    15 * 
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 38.1.1 %
    18 // Version : %version: 38.1.2 %
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include <hbglobal.h>
    21 #include <hbglobal.h>
    22 #include <mpxmediageneraldefs.h>
    22 #include <mpxmediageneraldefs.h>
    23 #include <mpxmediavideodefs.h>
    23 #include <mpxmediavideodefs.h>
   429     if (!videoArray || albumId == TMPXItemId::InvalidId())
   429     if (!videoArray || albumId == TMPXItemId::InvalidId())
   430     {
   430     {
   431         return;
   431         return;
   432     }
   432     }
   433     QSet<TMPXItemId> items;
   433     QSet<TMPXItemId> items;
   434        
   434     
       
   435     int oldCount = mAlbumData[albumId].count();
       
   436     
   435     // remove existing
   437     // remove existing
   436     mAlbumData.remove(albumId);
   438     mAlbumData.remove(albumId);
   437     
   439     
   438     int videoCount = videoArray->Count();
   440     int videoCount = videoArray->Count();
   439     CMPXMedia *media = 0;
   441     CMPXMedia *media = 0;
   448         }
   450         }
   449     }  
   451     }  
   450  
   452  
   451     mAlbumData[albumId] = items;
   453     mAlbumData[albumId] = items;
   452     
   454     
   453     // signal that album has been updated
   455     if(oldCount != items.count())
   454     emit q_ptr->albumChanged();
   456     {
   455 
   457         // signal that album has been updated
   456     // signal that model has changed.
   458         emit q_ptr->albumChanged();
   457     emit q_ptr->modelChanged();
   459 
       
   460         // signal that model has changed.
       
   461         emit q_ptr->modelChanged();
       
   462     }
   458 }
   463 }
   459 
   464 
   460 
   465 
   461 // -----------------------------------------------------------------------------
   466 // -----------------------------------------------------------------------------
   462 // thumbnailsFetchedSlot
   467 // thumbnailsFetchedSlot