Browse Source

Move member variable initialization

Move the initialization from constructor body to member initializer
list.
Remove superfluous initializer.
adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
a70219eea0
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/gui/banlistoptionsdialog.cpp
  2. 3
      src/gui/executionlogwidget.cpp
  3. 1
      src/gui/transferlistfilterswidget.cpp

2
src/gui/banlistoptionsdialog.cpp

@ -41,10 +41,10 @@
BanListOptionsDialog::BanListOptionsDialog(QWidget *parent) BanListOptionsDialog::BanListOptionsDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
, m_ui(new Ui::BanListOptionsDialog) , m_ui(new Ui::BanListOptionsDialog)
, m_model(new QStringListModel(BitTorrent::Session::instance()->bannedIPs(), this))
, m_modified(false) , m_modified(false)
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
m_model = new QStringListModel(BitTorrent::Session::instance()->bannedIPs(), this);
m_sortFilter = new QSortFilterProxyModel(this); m_sortFilter = new QSortFilterProxyModel(this);
m_sortFilter->setDynamicSortFilter(true); m_sortFilter->setDynamicSortFilter(true);

3
src/gui/executionlogwidget.cpp

@ -39,12 +39,11 @@
ExecutionLogWidget::ExecutionLogWidget(QWidget *parent, const Log::MsgTypes &types) ExecutionLogWidget::ExecutionLogWidget(QWidget *parent, const Log::MsgTypes &types)
: QWidget(parent) : QWidget(parent)
, m_ui(new Ui::ExecutionLogWidget) , m_ui(new Ui::ExecutionLogWidget)
, m_msgList(new LogListWidget(MAX_LOG_MESSAGES, Log::MsgTypes(types)))
, m_peerList(new LogListWidget(MAX_LOG_MESSAGES)) , m_peerList(new LogListWidget(MAX_LOG_MESSAGES))
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
m_msgList = new LogListWidget(MAX_LOG_MESSAGES, Log::MsgTypes(types));
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
m_ui->tabConsole->setTabIcon(0, GuiIconProvider::instance()->getIcon("view-calendar-journal")); m_ui->tabConsole->setTabIcon(0, GuiIconProvider::instance()->getIcon("view-calendar-journal"));
m_ui->tabConsole->setTabIcon(1, GuiIconProvider::instance()->getIcon("view-filter")); m_ui->tabConsole->setTabIcon(1, GuiIconProvider::instance()->getIcon("view-filter"));

1
src/gui/transferlistfilterswidget.cpp

@ -561,7 +561,6 @@ QStringList TrackerFiltersList::getHashes(int row)
TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferListWidget *transferList) TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferListWidget *transferList)
: QFrame(parent) : QFrame(parent)
, m_transferList(transferList) , m_transferList(transferList)
, m_trackerFilters(nullptr)
{ {
Preferences *const pref = Preferences::instance(); Preferences *const pref = Preferences::instance();

Loading…
Cancel
Save