diff options
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/playlistmodel.cpp | 5 | ||||
| -rw-r--r-- | src/qmmpui/playlistmodel.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index e3845ef83..0b8602334 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -206,6 +206,11 @@ void PlayListModel::insert(int index, const QList<PlayListTrack *> &tracks) emit listChanged(flags); } +void PlayListModel::insert(int index, const QByteArray &json) +{ + insert(index, PlayListParser::deserialize(json)); +} + void PlayListModel::insert(PlayListItem *before, const QList<PlayListTrack *> &tracks) { if(before) diff --git a/src/qmmpui/playlistmodel.h b/src/qmmpui/playlistmodel.h index bfc8bade6..2a9cb8f3d 100644 --- a/src/qmmpui/playlistmodel.h +++ b/src/qmmpui/playlistmodel.h @@ -414,6 +414,7 @@ public slots: * Inserts \b tracks at index position \b index in the playlist. */ void insert(int index, const QList<PlayListTrack *> &tracks); + void insert(int index, const QByteArray &json); /*! * Inserts \b tracks after item \b before in the playlist. */ |
