mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
#5982: Simplify filter bar connections by using needed slot directly
This commit is contained in:
parent
63e4700a10
commit
1640a71127
2 changed files with 5 additions and 14 deletions
|
@ -251,10 +251,10 @@ FilterBar::FilterBar (Prefs& prefs, const TorrentModel& torrents, const TorrentF
|
|||
connect (myTrackerCombo, SIGNAL (currentIndexChanged (int)), this, SLOT (onTrackerIndexChanged (int)));
|
||||
connect (&myFilter, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
|
||||
connect (&myFilter, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
|
||||
connect (&myTorrents, SIGNAL (modelReset ()), this, SLOT (onTorrentModelReset ()));
|
||||
connect (&myTorrents, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsInserted (QModelIndex, int, int)));
|
||||
connect (&myTorrents, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsRemoved (QModelIndex, int, int)));
|
||||
connect (&myTorrents, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (onTorrentModelDataChanged (QModelIndex, QModelIndex)));
|
||||
connect (&myTorrents, SIGNAL (modelReset ()), this, SLOT (recountSoon ()));
|
||||
connect (&myTorrents, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (recountSoon ()));
|
||||
connect (&myTorrents, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (recountSoon ()));
|
||||
connect (&myTorrents, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (recountSoon ()));
|
||||
connect (myRecountTimer, SIGNAL (timeout ()), this, SLOT (recount ()));
|
||||
|
||||
recountSoon ();
|
||||
|
@ -356,11 +356,6 @@ FilterBar::onActivityIndexChanged (int i)
|
|||
****
|
||||
***/
|
||||
|
||||
void FilterBar::onTorrentModelReset () { recountSoon (); }
|
||||
void FilterBar::onTorrentModelRowsInserted (const QModelIndex&, int, int) { recountSoon (); }
|
||||
void FilterBar::onTorrentModelRowsRemoved (const QModelIndex&, int, int) { recountSoon (); }
|
||||
void FilterBar::onTorrentModelDataChanged (const QModelIndex&, const QModelIndex&) { recountSoon (); }
|
||||
|
||||
void
|
||||
FilterBar::recountSoon ()
|
||||
{
|
||||
|
|
|
@ -33,20 +33,16 @@ class FilterBar: public QWidget
|
|||
private:
|
||||
FilterBarComboBox * createTrackerCombo (QStandardItemModel *);
|
||||
FilterBarComboBox * createActivityCombo ();
|
||||
void recountSoon ();
|
||||
void refreshTrackers ();
|
||||
QString getCountString (int n) const;
|
||||
|
||||
private slots:
|
||||
void recountSoon ();
|
||||
void recount ();
|
||||
void refreshPref (int key);
|
||||
void refreshCountLabel ();
|
||||
void onActivityIndexChanged (int index);
|
||||
void onTrackerIndexChanged (int index);
|
||||
void onTorrentModelReset ();
|
||||
void onTorrentModelRowsInserted (const QModelIndex&, int, int);
|
||||
void onTorrentModelRowsRemoved (const QModelIndex&, int, int);
|
||||
void onTorrentModelDataChanged (const QModelIndex&, const QModelIndex&);
|
||||
void onTextChanged (const QString&);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue