mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
Revise class memebers construction & destruction
Use nullptr Delete m_contentDelegate on close Remove redundant deletion of m_contentModel since parent is setup correctly
This commit is contained in:
parent
4d4097d819
commit
b9e8cab1e5
@ -78,8 +78,8 @@ namespace
|
|||||||
AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
|
AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::AddNewTorrentDialog)
|
, ui(new Ui::AddNewTorrentDialog)
|
||||||
, m_contentModel(0)
|
, m_contentModel(nullptr)
|
||||||
, m_contentDelegate(0)
|
, m_contentDelegate(nullptr)
|
||||||
, m_hasMetadata(false)
|
, m_hasMetadata(false)
|
||||||
, m_oldIndex(0)
|
, m_oldIndex(0)
|
||||||
, m_torrentParams(inParams)
|
, m_torrentParams(inParams)
|
||||||
@ -148,9 +148,9 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||||||
AddNewTorrentDialog::~AddNewTorrentDialog()
|
AddNewTorrentDialog::~AddNewTorrentDialog()
|
||||||
{
|
{
|
||||||
saveState();
|
saveState();
|
||||||
|
|
||||||
|
delete m_contentDelegate;
|
||||||
delete ui;
|
delete ui;
|
||||||
if (m_contentModel)
|
|
||||||
delete m_contentModel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AddNewTorrentDialog::isEnabled()
|
bool AddNewTorrentDialog::isEnabled()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user