diff options
| -rw-r--r-- | src/qmmpui/playlisttrack.cpp | 12 | ||||
| -rw-r--r-- | src/qmmpui/playlisttrack.h | 10 |
2 files changed, 19 insertions, 3 deletions
diff --git a/src/qmmpui/playlisttrack.cpp b/src/qmmpui/playlisttrack.cpp index ad75d33f9..b13a91131 100644 --- a/src/qmmpui/playlisttrack.cpp +++ b/src/qmmpui/playlisttrack.cpp @@ -71,6 +71,18 @@ PlayListTrack::~PlayListTrack() qWarning("PlayListTrack: deleting busy track"); } +PlayListTrack &PlayListTrack::operator=(const PlayListTrack &other) +{ + m_formattedTitles = other.m_formattedTitles; + m_group = other.m_group; + m_formattedLength = other.m_formattedLength; + m_titleFormats = other.m_titleFormats; + m_groupFormat = other.m_groupFormat; + setSelected(other.isSelected()); + m_length = other.m_length; + m_formattedLength = other.m_formattedLength; +} + void PlayListTrack::updateMetaData(const QMap <Qmmp::MetaData, QString> &metaData) { QMap <Qmmp::MetaData, QString>::operator =(metaData); diff --git a/src/qmmpui/playlisttrack.h b/src/qmmpui/playlisttrack.h index 1760b864e..6677a91d2 100644 --- a/src/qmmpui/playlisttrack.h +++ b/src/qmmpui/playlisttrack.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013-2014 by Ilya Kotov * + * Copyright (C) 2013-2017 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -41,9 +41,9 @@ public: */ PlayListTrack(); /*! - * Constructs a new PlayListTrack that is a copy of the given \b item + * Constructs a new PlayListTrack that is a copy of the given track \b other */ - PlayListTrack(const PlayListTrack &item); + PlayListTrack(const PlayListTrack &other); /*! * Constructs plalist item with given metadata. * @param info Media file information. @@ -54,6 +54,10 @@ public: */ virtual ~PlayListTrack(); /*! + * Assigns \b other to this track and returns a reference to this track. + */ + PlayListTrack &operator=(const PlayListTrack &other); + /*! * Returns formatted title of the item. * @param column Number of column. */ |
