qt: Plug many memory leaks
None of these are very serious, and are leaks in objects that are created at most one time. In most cases this means properly using the QObject parent hierarchy, except for BanTablePriv/PeerTablePriv which are not QObject, so use a std::unique_ptr instead. Github-Pull: #9190 Rebased-From: 47db07537746940ee7dd0739a8c73e328837813f
This commit is contained in:
committed by
Luke Dashjr
parent
ff423cc6b0
commit
dc46b10a08
@@ -86,7 +86,7 @@ BanTableModel::BanTableModel(ClientModel *parent) :
|
||||
clientModel(parent)
|
||||
{
|
||||
columns << tr("IP/Netmask") << tr("Banned Until");
|
||||
priv = new BanTablePriv();
|
||||
priv.reset(new BanTablePriv());
|
||||
// default to unsorted
|
||||
priv->sortColumn = -1;
|
||||
|
||||
@@ -94,6 +94,11 @@ BanTableModel::BanTableModel(ClientModel *parent) :
|
||||
refresh();
|
||||
}
|
||||
|
||||
BanTableModel::~BanTableModel()
|
||||
{
|
||||
// Intentionally left empty
|
||||
}
|
||||
|
||||
int BanTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
Reference in New Issue
Block a user