forked from osmocom/wireshark
Qt: Plug credentials model memory leak
This commit is contained in:
parent
058400d8e0
commit
9afd2f23ef
|
@ -20,6 +20,11 @@ CredentialsModel::CredentialsModel(QObject *parent)
|
|||
{
|
||||
}
|
||||
|
||||
CredentialsModel::~CredentialsModel()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
int CredentialsModel::rowCount(const QModelIndex &) const
|
||||
{
|
||||
return static_cast<int>(credentials_.count());
|
||||
|
|
|
@ -25,6 +25,7 @@ class CredentialsModel : public QAbstractListModel
|
|||
|
||||
public:
|
||||
CredentialsModel(QObject *parent);
|
||||
~CredentialsModel();
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const ;
|
||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
|
|
Loading…
Reference in New Issue