mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-07 15:28:47 +01:00
SmartPlaylistsModel: Save smart playlist type as int
This commit is contained in:
parent
af37056179
commit
fdfe164dd1
@ -232,7 +232,7 @@ void SmartPlaylistsModel::DeleteGenerator(const QModelIndex &idx) {
|
||||
for (SmartPlaylistsItem *item : root_->children) {
|
||||
s.setArrayIndex(i++);
|
||||
s.setValue("name", item->display_text);
|
||||
s.setValue("type", QVariant::fromValue(item->smart_playlist_type));
|
||||
s.setValue("type", static_cast<int>(item->smart_playlist_type));
|
||||
s.setValue("data", item->smart_playlist_data);
|
||||
}
|
||||
s.endArray();
|
||||
@ -244,7 +244,7 @@ void SmartPlaylistsModel::SaveGenerator(QSettings *s, const int i, PlaylistGener
|
||||
|
||||
s->setArrayIndex(i);
|
||||
s->setValue("name", generator->name());
|
||||
s->setValue("type", QVariant::fromValue(generator->type()));
|
||||
s->setValue("type", static_cast<int>(generator->type()));
|
||||
s->setValue("data", generator->Save());
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user