1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-14 18:03:44 +01:00

Fix radio items leak

This commit is contained in:
Jonas Kvinge 2021-08-31 22:45:28 +02:00
parent 1ba20561ed
commit fc57b437c2
2 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,10 @@ RadioModel::RadioModel(Application *app, QObject *parent)
}
RadioModel::~RadioModel() {
delete root_;
}
Qt::ItemFlags RadioModel::flags(const QModelIndex &idx) const {
switch (IndexToItem(idx)->type) {

View File

@ -48,6 +48,7 @@ class RadioModel : public SimpleTreeModel<RadioItem> {
public:
explicit RadioModel(Application *app, QObject *parent = nullptr);
~RadioModel() override;
enum Role {
Role_Type = Qt::UserRole + 1,