Call destructors for authors and entries

This commit is contained in:
Tobias Fella 2020-11-01 13:03:04 +01:00
parent b76d1d81d1
commit 70393521f3
3 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,11 @@ EntriesModel::EntriesModel(Feed *feed)
});
}
EntriesModel::~EntriesModel()
{
qDeleteAll(m_entries);
}
QVariant EntriesModel::data(const QModelIndex &index, int role) const
{
if (role != 0)

View File

@ -22,6 +22,7 @@ class EntriesModel : public QAbstractListModel
public:
explicit EntriesModel(Feed *feed);
~EntriesModel() override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;
int rowCount(const QModelIndex &parent) const override;

View File

@ -45,6 +45,7 @@ Entry::Entry(Feed *feed, int index)
Entry::~Entry()
{
qDeleteAll(m_authors);
}
QString Entry::id() const