Changeset 8325


Ignore:
Timestamp:
May 3, 2009, 6:35:33 PM (12 years ago)
Author:
charles
Message:

(trunk qt) fix remove-torrent filtering error reported by W4pp

Location:
trunk/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r8323 r8325  
    189189    // torrent view
    190190    myFilterModel.setSourceModel( &myModel );
     191    connect( &myModel, SIGNAL(modelReset()), this, SLOT(onModelReset()));
     192    connect( &myModel, SIGNAL(rowsRemoved(const QModelIndex&,int,int)), this, SLOT(onModelReset()));
     193    connect( &myModel, SIGNAL(rowsInserted(const QModelIndex&,int,int)), this, SLOT(onModelReset()));
    191194    ui.listView->setModel( &myFilterModel );
    192195    connect( ui.listView->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)), this, SLOT(refreshActionSensitivity()));
     
    279282{
    280283    myModel.clear( );
     284}
     285
     286void
     287TrMainWindow :: onModelReset( )
     288{
    281289    refreshTitle( );
    282290    refreshVisibleCount( );
  • trunk/qt/mainwin.h

    r8323 r8325  
    122122        void onSetPrefs( bool );
    123123        void onSessionSourceChanged( );
     124        void onModelReset( );
    124125
    125126    private slots:
  • trunk/qt/torrent-model.cc

    r8323 r8325  
    205205    {
    206206        Torrent * tor = myIdToTorrent.value( id, 0 );
    207         std::cerr << "removing torrent " << id << std::endl;
    208207
    209208        beginRemoveRows( QModelIndex(), row, row );
Note: See TracChangeset for help on using the changeset viewer.