diff options
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/playlistitem.cpp | 11 | ||||
| -rw-r--r-- | src/qmmpui/playlistitem.h | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/qmmpui/playlistitem.cpp b/src/qmmpui/playlistitem.cpp index d13d7ab18..4ff602948 100644 --- a/src/qmmpui/playlistitem.cpp +++ b/src/qmmpui/playlistitem.cpp @@ -32,6 +32,17 @@ PlayListItem::PlayListItem() : AbstractPlaylistItem(), m_flag(FREE) m_current = false; } +PlayListItem::PlayListItem(const PlayListItem &other) : AbstractPlaylistItem(other), m_flag(other.m_flag) +{ + m_title = other.m_title; + if (other.m_info) + { + m_info = new FileInfo(*(other.m_info)); + } + m_selected = other.m_selected; + m_current = other.m_current; +} + PlayListItem::PlayListItem(FileInfo *info) : AbstractPlaylistItem(), m_flag(FREE) { m_selected = false; diff --git a/src/qmmpui/playlistitem.h b/src/qmmpui/playlistitem.h index c1bec3e38..9ad51ee67 100644 --- a/src/qmmpui/playlistitem.h +++ b/src/qmmpui/playlistitem.h @@ -50,6 +50,10 @@ public: */ PlayListItem(); /*! + * Constructs a new PlayListItem that is a copy of the given \b item + */ + PlayListItem(const PlayListItem &item); + /*! * Constructs plalist item with given metadata. * @param info Media file information. */ |
