comment out and remove all view functions from the Playlist class

parent e7e80fa5
...@@ -253,7 +253,6 @@ void PlaylistItem::clear() ...@@ -253,7 +253,6 @@ void PlaylistItem::clear()
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) : PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) :
K3ListViewItem(parent),
d(0), d(0),
m_watched(0) m_watched(0)
{ {
...@@ -261,7 +260,6 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) : ...@@ -261,7 +260,6 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) :
} }
PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, Q3ListViewItem *after) : PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, Q3ListViewItem *after) :
K3ListViewItem(parent, after),
d(0), d(0),
m_watched(0) m_watched(0)
{ {
...@@ -272,7 +270,6 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, Q3ListVie ...@@ -272,7 +270,6 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, Q3ListVie
// This constructor should only be used by the CollectionList subclass. // This constructor should only be used by the CollectionList subclass.
PlaylistItem::PlaylistItem(CollectionList *parent) : PlaylistItem::PlaylistItem(CollectionList *parent) :
K3ListViewItem(parent),
m_watched(0) m_watched(0)
{ {
d = new Data; d = new Data;
......
...@@ -42,7 +42,7 @@ typedef QList<PlaylistItem *> PlaylistItemList; ...@@ -42,7 +42,7 @@ typedef QList<PlaylistItem *> PlaylistItemList;
* Playlist::clearItem(). * Playlist::clearItem().
*/ */
class PlaylistItem : public K3ListViewItem class PlaylistItem
{ {
friend class Playlist; friend class Playlist;
friend class SearchPlaylist; friend class SearchPlaylist;
...@@ -141,16 +141,6 @@ public: ...@@ -141,16 +141,6 @@ public:
*/ */
virtual void clear(); virtual void clear();
/**
* Returns properly casted item below this one.
*/
PlaylistItem *itemBelow() { return static_cast<PlaylistItem *>(K3ListViewItem::itemBelow()); }
/**
* Returns properly casted item above this one.
*/
PlaylistItem *itemAbove() { return static_cast<PlaylistItem *>(K3ListViewItem::itemAbove()); }
/** /**
* Returns a reference to the list of the currnetly playing items, with the * Returns a reference to the list of the currnetly playing items, with the
* first being the "master" item (i.e. the item from which the next track is * first being the "master" item (i.e. the item from which the next track is
...@@ -208,7 +198,6 @@ private: ...@@ -208,7 +198,6 @@ private:
KSharedPtr<Data> d; KSharedPtr<Data> d;
void setup(CollectionListItem *item); void setup(CollectionListItem *item);
using Q3ListViewItem::setup; // Avoid warning about hidden function.
CollectionListItem *m_collectionItem; CollectionListItem *m_collectionItem;
quint32 m_trackId; quint32 m_trackId;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "dynamicplaylist.h" #include "dynamicplaylist.h"
#include "collectionlist.h" #include "collectionlist.h"
#include "playlistcollection.h" #include "playlist/playlistcollection.h"
#include "tracksequencemanager.h" #include "tracksequencemanager.h"
#include <QTimer> #include <QTimer>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -49,7 +49,7 @@ class CollectionListItem; ...@@ -49,7 +49,7 @@ class CollectionListItem;
typedef QList<PlaylistItem *> PlaylistItemList; typedef QList<PlaylistItem *> PlaylistItemList;
class Playlist : public PlaylistInterface, public QAbstractListModel class Playlist : public QAbstractListModel, public PlaylistInterface
{ {
Q_OBJECT Q_OBJECT
...@@ -113,13 +113,13 @@ public: ...@@ -113,13 +113,13 @@ public:
* currently set, the default behavior is to prompt the user for a file * currently set, the default behavior is to prompt the user for a file
* name. * name.
*/ */
virtual void save(); // virtual void save();
/** /**
* Standard "save as". Prompts the user for a location where to save the * Standard "save as". Prompts the user for a location where to save the
* playlist to. * playlist to.
*/ */
virtual void saveAs(); // virtual void saveAs();
/** /**
* Removes \a item from the Playlist, but not from the disk. If * Removes \a item from the Playlist, but not from the disk. If
...@@ -173,7 +173,7 @@ public: ...@@ -173,7 +173,7 @@ public:
* both PlaylistItems and CollectionListItems. * both PlaylistItems and CollectionListItems.
*/ */
virtual PlaylistItem *createItem(const FileHandle &file, virtual PlaylistItem *createItem(const FileHandle &file,
Q3ListViewItem *after = 0, PlaylistItem *after,
bool emitChanged = true); bool emitChanged = true);
/** /**
...@@ -182,7 +182,7 @@ public: ...@@ -182,7 +182,7 @@ public:
*/ */
template <class ItemType> template <class ItemType>
ItemType *createItem(const FileHandle &file, ItemType *createItem(const FileHandle &file,
Q3ListViewItem *after = 0, ItemType *after = 0,
bool emitChanged = true); bool emitChanged = true);
virtual void createItems(const PlaylistItemList &siblings, PlaylistItem *after = 0); virtual void createItems(const PlaylistItemList &siblings, PlaylistItem *after = 0);
...@@ -713,14 +713,16 @@ QDataStream &operator>>(QDataStream &s, Playlist &p); ...@@ -713,14 +713,16 @@ QDataStream &operator>>(QDataStream &s, Playlist &p);
// template method implementations // template method implementations
template <class ItemType> template <class ItemType>
ItemType *Playlist::createItem(const FileHandle &file, Q3ListViewItem *after, ItemType *Playlist::createItem(const FileHandle &file, ItemType *after,
bool emitChanged) bool emitChanged)
{ {
CollectionListItem *item = collectionListItem(file); CollectionListItem *item = collectionListItem(file);
if(item && (!m_members.insert(file.absFilePath()) || m_allowDuplicates)) { if(item && (!m_members.insert(file.absFilePath()) || m_allowDuplicates)) {
ItemType *i = after ? new ItemType(item, this, after) : new ItemType(item, this); ItemType *i = after ? new ItemType(item, this) : new ItemType(item, this);
setupItem(i); setupItem(i);
m_items.insert(m_items.indexOf(after), i);
if(emitChanged) if(emitChanged)
dataChanged(); dataChanged();
...@@ -737,7 +739,7 @@ ItemType *Playlist::createItem(SiblingType *sibling, ItemType *after) ...@@ -737,7 +739,7 @@ ItemType *Playlist::createItem(SiblingType *sibling, ItemType *after)
m_disableColumnWidthUpdates = true; m_disableColumnWidthUpdates = true;
if(!m_members.insert(sibling->file().absFilePath()) || m_allowDuplicates) { if(!m_members.insert(sibling->file().absFilePath()) || m_allowDuplicates) {
after = new ItemType(sibling->collectionItem(), this, after); after = new ItemType(sibling->collectionItem(), this);
setupItem(after); setupItem(after);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment