Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1838bb97 authored by Michael Pyne's avatar Michael Pyne

Rename some playlist observer virt methods to avoid -Wshadow warnings.

parent 70fe134d
......@@ -172,7 +172,7 @@ void CollectionList::clearItems(const PlaylistItemList &items)
delete item;
}
dataChanged();
playlistItemsChanged();
}
void CollectionList::setupTreeViewEntries(ViewMode *viewMode) const
......@@ -495,12 +495,12 @@ void CollectionListItem::refresh()
for(PlaylistItemList::Iterator it = m_children.begin(); it != m_children.end(); ++it) {
(*it)->playlist()->update();
(*it)->playlist()->dataChanged();
(*it)->playlist()->playlistItemsChanged();
}
if(treeWidget()->isVisible())
treeWidget()->viewport()->update();
CollectionList::instance()->dataChanged();
CollectionList::instance()->playlistItemsChanged();
emit CollectionList::instance()->signalCollectionChanged();
}
......@@ -549,7 +549,7 @@ CollectionListItem::CollectionListItem(CollectionList *parent, const FileHandle
if(file.tag()) {
refresh();
parent->dataChanged();
parent->playlistItemsChanged();
}
else {
qCCritical(JUK_LOG) << "CollectionListItem::CollectionListItem() -- Tag() could not be created.";
......
......@@ -153,7 +153,7 @@ QDataStream &operator>>(QDataStream &s, HistoryPlaylist &p)
}
}
p.dataChanged();
p.playlistItemsChanged();
return s;
}
......
......@@ -594,7 +594,7 @@ void Playlist::clearItem(PlaylistItem *item)
// Automatically updates internal structs via updateDeletedItem
delete item;
dataChanged();
playlistItemsChanged();
}
void Playlist::clearItems(const PlaylistItemList &items)
......@@ -602,7 +602,7 @@ void Playlist::clearItems(const PlaylistItemList &items)
foreach(PlaylistItem *item, items)
delete item;
dataChanged();
playlistItemsChanged();
}
PlaylistItem *Playlist::playingItem() // static
......@@ -772,7 +772,7 @@ void Playlist::slotRenameFile()
m_blockDataChanged = true;
renamer.rename(items);
m_blockDataChanged = false;
dataChanged();
playlistItemsChanged();
emit signalEnableDirWatch(true);
}
......@@ -868,7 +868,7 @@ void Playlist::slotGuessTagInfo(TagGuesser::Type type)
m_blockDataChanged = false;
dataChanged();
playlistItemsChanged();
setDynamicListsFrozen(false);
QApplication::restoreOverrideCursor();
}
......@@ -934,11 +934,11 @@ void Playlist::slotColumnResizeModeChanged()
SharedSettings::instance()->sync();
}
void Playlist::dataChanged()
void Playlist::playlistItemsChanged()
{
if(m_blockDataChanged)
return;
PlaylistInterface::dataChanged();
PlaylistInterface::playlistItemsChanged();
}
////////////////////////////////////////////////////////////////////////////////
......@@ -986,7 +986,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
m_blockDataChanged = false;
dataChanged();
playlistItemsChanged();
}
}
......@@ -1172,7 +1172,7 @@ void Playlist::dropEvent(QDropEvent *e)
m_blockDataChanged = false;
dataChanged();
playlistItemsChanged();
emit signalPlaylistItemsDropped(this);
QTreeWidget::dropEvent(e);
}
......@@ -1220,7 +1220,7 @@ void Playlist::read(QDataStream &s)
m_blockDataChanged = false;
dataChanged();
playlistItemsChanged();
m_collection->setupPlaylist(this, "audio-midi");
}
......@@ -1304,7 +1304,7 @@ void Playlist::addFiles(const QStringList &files, PlaylistItem *after)
m_blockDataChanged = false;
slotWeightDirty();
dataChanged();
playlistItemsChanged();
QApplication::restoreOverrideCursor();
}
......@@ -1682,7 +1682,7 @@ void Playlist::loadFile(const QString &fileName, const QFileInfo &fileInfo)
file.close();
dataChanged();
playlistItemsChanged();
m_disableColumnWidthUpdates = false;
}
......
......@@ -405,7 +405,7 @@ public slots:
void slotColumnResizeModeChanged();
virtual void dataChanged();
virtual void playlistItemsChanged();
protected:
/**
......@@ -739,7 +739,7 @@ ItemType *Playlist::createItem(const FileHandle &file, QTreeWidgetItem *after,
setupItem(i);
if(emitChanged)
dataChanged();
playlistItemsChanged();
return i;
}
......@@ -771,7 +771,7 @@ void Playlist::createItems(const QList<SiblingType *> &siblings, ItemType *after
foreach(SiblingType *sibling, siblings)
after = createItem(sibling, after);
dataChanged();
playlistItemsChanged();
slotWeightDirty();
}
......
......@@ -143,35 +143,35 @@ void PlaylistCollection::playFirst()
{
m_playing = true;
currentPlaylist()->playFirst();
currentChanged();
currentPlayingItemChanged();
}
void PlaylistCollection::playNextAlbum()
{
m_playing = true;
currentPlaylist()->playNextAlbum();
currentChanged();
currentPlayingItemChanged();
}
void PlaylistCollection::playPrevious()
{
m_playing = true;
currentPlaylist()->playPrevious();
currentChanged();
currentPlayingItemChanged();
}
void PlaylistCollection::playNext()
{
m_playing = true;
currentPlaylist()->playNext();
currentChanged();
currentPlayingItemChanged();
}
void PlaylistCollection::stop()
{
m_playing = false;
currentPlaylist()->stop();
dataChanged();
playlistItemsChanged();
}
bool PlaylistCollection::playing() const
......@@ -359,7 +359,7 @@ void PlaylistCollection::open(const QStringList &l)
visiblePlaylist()->addFiles(files);
}
dataChanged();
playlistItemsChanged();
}
void PlaylistCollection::open(const QString &playlist, const QStringList &files)
......@@ -485,13 +485,13 @@ void PlaylistCollection::renameItems()
void PlaylistCollection::addCovers(bool fromFile)
{
visiblePlaylist()->slotAddCover(fromFile);
dataChanged();
playlistItemsChanged();
}
void PlaylistCollection::removeCovers()
{
visiblePlaylist()->slotRemoveCover();
dataChanged();
playlistItemsChanged();
}
void PlaylistCollection::viewCovers()
......@@ -670,7 +670,7 @@ void PlaylistCollection::raise(Playlist *playlist)
playlist->setSearchEnabled(m_searchEnabled);
m_playlistStack->setCurrentWidget(playlist);
clearShowMore(false);
dataChanged();
playlistItemsChanged();
}
void PlaylistCollection::raiseDistraction()
......
......@@ -20,13 +20,13 @@
// Watched implementation
////////////////////////////////////////////////////////////////////////////////
void Watched::currentChanged()
void Watched::currentPlayingItemChanged()
{
foreach(PlaylistObserver *observer, m_observers)
observer->updateCurrent();
}
void Watched::dataChanged()
void Watched::playlistItemsChanged()
{
foreach(PlaylistObserver *observer, m_observers)
observer->updateData();
......
......@@ -43,13 +43,13 @@ public:
/**
* This is triggered when the currently playing item has been changed.
*/
virtual void currentChanged();
virtual void currentPlayingItemChanged();
/**
* This is triggered when the data in the playlist -- i.e. the tag content
* changes.
*/
virtual void dataChanged();
virtual void playlistItemsChanged();
protected:
virtual ~Watched();
......
......@@ -603,7 +603,7 @@ void TagEditor::save(const PlaylistItemList &list)
}
TagTransactionManager::instance()->commit();
CollectionList::instance()->dataChanged();
CollectionList::instance()->playlistItemsChanged();
m_performingSave = false;
QApplication::restoreOverrideCursor();
}
......
......@@ -181,7 +181,7 @@ bool TagTransactionManager::processChangeList(bool undo)
item->refreshFromDisk();
//FIXME repaint
//item->repaint();
item->playlist()->dataChanged();
item->playlist()->playlistItemsChanged();
item->playlist()->update();
}
else {
......
......@@ -75,7 +75,7 @@ void UpcomingPlaylist::appendItems(const PlaylistItemList &itemList)
m_playlistIndex.insert(after, playlistItem->playlist());
}
dataChanged();
playlistItemsChanged();
slotWeightDirty();
}
......@@ -159,7 +159,7 @@ void UpcomingPlaylist::removeIteratorOverride()
setPlaying(manager()->currentItem(), true);
Watched::currentChanged();
Watched::currentPlayingItemChanged();
}
TrackSequenceManager *UpcomingPlaylist::manager() const
......@@ -223,7 +223,7 @@ void UpcomingPlaylist::UpcomingSequenceIterator::setCurrent(PlaylistItem *curren
if(p != m_playlist) {
PlaylistItem *i = m_playlist->createItem(currentItem, (PlaylistItem *) 0);
m_playlist->playlistIndex().insert(i, p);
m_playlist->dataChanged();
m_playlist->playlistItemsChanged();
m_playlist->slotWeightDirty();
}
else {
......
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