Changeset 14468


Ignore:
Timestamp:
Jan 29, 2015, 10:44:43 PM (6 years ago)
Author:
mikedld
Message:

Pass constant Prefs, TorrentFilter?, TorrentModel? objects where no modification is needed

Location:
trunk/qt
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/details.cc

    r14466 r14468  
    174174Details::Details (Session       & session,
    175175                  Prefs         & prefs,
    176                   TorrentModel  & model,
     176                  const TorrentModel& model,
    177177                  QWidget       * parent):
    178178  QDialog (parent, Qt::Dialog),
  • trunk/qt/details.h

    r14397 r14468  
    4141
    4242  public:
    43     Details (Session&, Prefs&, TorrentModel&, QWidget * parent = 0);
     43    Details (Session&, Prefs&, const TorrentModel&, QWidget * parent = 0);
    4444    ~Details ();
    4545    void setIds (const QSet<int>& ids);
     
    6161    Session& mySession;
    6262    Prefs& myPrefs;
    63     TorrentModel& myModel;
     63    const TorrentModel& myModel;
    6464    QSet<int> myIds;
    6565    QTimer myTimer;
  • trunk/qt/filterbar.cc

    r14466 r14468  
    537537****/
    538538
    539 FilterBar::FilterBar (Prefs& prefs, TorrentModel& torrents, TorrentFilter& filter, QWidget * parent):
     539FilterBar::FilterBar (Prefs& prefs, const TorrentModel& torrents, const TorrentFilter& filter, QWidget * parent):
    540540  QWidget (parent),
    541541  myPrefs (prefs),
  • trunk/qt/filterbar.h

    r14445 r14468  
    8787
    8888  public:
    89     FilterBar (Prefs& prefs, TorrentModel& torrents, TorrentFilter& filter, QWidget * parent = 0);
     89    FilterBar (Prefs& prefs, const TorrentModel& torrents, const TorrentFilter& filter, QWidget * parent = 0);
    9090    ~FilterBar ();
    9191
     
    9999  private:
    100100    Prefs& myPrefs;
    101     TorrentModel& myTorrents;
    102     TorrentFilter& myFilter;
     101    const TorrentModel& myTorrents;
     102    const TorrentFilter& myFilter;
    103103    FilterBarComboBox * myActivityCombo;
    104104    FilterBarComboBox * myTrackerCombo;
  • trunk/qt/torrent-filter.cc

    r14428 r14468  
    1919#include "utils.h"
    2020
    21 TorrentFilter::TorrentFilter (Prefs& prefs):
     21TorrentFilter::TorrentFilter (const Prefs& prefs):
    2222  myPrefs (prefs)
    2323{
  • trunk/qt/torrent-filter.h

    r14241 r14468  
    2727
    2828  public:
    29     TorrentFilter (Prefs& prefs);
     29    TorrentFilter (const Prefs& prefs);
    3030    virtual ~TorrentFilter ();
    3131
     
    4949
    5050  private:
    51     Prefs& myPrefs;
     51    const Prefs& myPrefs;
    5252};
    5353
  • trunk/qt/torrent-model.cc

    r14394 r14468  
    8181}
    8282
    83 TorrentModel::TorrentModel (Prefs& prefs):
     83TorrentModel::TorrentModel (const Prefs& prefs):
    8484  myPrefs (prefs)
    8585{
  • trunk/qt/torrent-model.h

    r14241 r14468  
    3737    id_to_torrent_t myIdToTorrent;
    3838    torrents_t myTorrents;
    39     Prefs& myPrefs;
     39    const Prefs& myPrefs;
    4040
    4141  public:
     
    7272
    7373  public:
    74     TorrentModel (Prefs& prefs);
     74    TorrentModel (const Prefs& prefs);
    7575    virtual ~TorrentModel ();
    7676};
  • trunk/qt/torrent.cc

    r14466 r14468  
    3030
    3131
    32 Torrent::Torrent (Prefs& prefs, int id):
     32Torrent::Torrent (const Prefs& prefs, int id):
    3333  magnetTorrent (false),
    3434  myPrefs (prefs)
  • trunk/qt/torrent.h

    r14404 r14468  
    183183
    184184  public:
    185     Torrent (Prefs&, int id);
     185    Torrent (const Prefs&, int id);
    186186    virtual ~Torrent ();
    187187
     
    342342
    343343  private:
    344     Prefs& myPrefs;
     344    const Prefs& myPrefs;
    345345    FileList myFiles;
    346346};
Note: See TracChangeset for help on using the changeset viewer.