Ignore:
Timestamp:
Aug 17, 2015, 8:14:45 AM (7 years ago)
Author:
mikedld
Message:

#5982: Simplify filter bar connections by using needed slot directly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/FilterBar.cc

    r14539 r14560  
    252252  connect (&myFilter, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
    253253  connect (&myFilter, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
    254   connect (&myTorrents, SIGNAL (modelReset ()), this, SLOT (onTorrentModelReset ()));
    255   connect (&myTorrents, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsInserted (QModelIndex, int, int)));
    256   connect (&myTorrents, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsRemoved (QModelIndex, int, int)));
    257   connect (&myTorrents, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (onTorrentModelDataChanged (QModelIndex, QModelIndex)));
     254  connect (&myTorrents, SIGNAL (modelReset ()), this, SLOT (recountSoon ()));
     255  connect (&myTorrents, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (recountSoon ()));
     256  connect (&myTorrents, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (recountSoon ()));
     257  connect (&myTorrents, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (recountSoon ()));
    258258  connect (myRecountTimer, SIGNAL (timeout ()), this, SLOT (recount ()));
    259259
     
    357357***/
    358358
    359 void FilterBar::onTorrentModelReset () { recountSoon (); }
    360 void FilterBar::onTorrentModelRowsInserted (const QModelIndex&, int, int) { recountSoon (); }
    361 void FilterBar::onTorrentModelRowsRemoved (const QModelIndex&, int, int) { recountSoon (); }
    362 void FilterBar::onTorrentModelDataChanged (const QModelIndex&, const QModelIndex&) { recountSoon (); }
    363 
    364359void
    365360FilterBar::recountSoon ()
Note: See TracChangeset for help on using the changeset viewer.