Formatting
This commit is contained in:
@@ -861,7 +861,7 @@ void Playlist::InsertItems(const PlaylistItemList &itemsIn, int pos, bool play_n
|
||||
// exercise vetoes
|
||||
SongList songs;
|
||||
|
||||
for (const PlaylistItemPtr &item : items) {
|
||||
for (const PlaylistItemPtr item : items) {
|
||||
songs << item->Metadata();
|
||||
}
|
||||
|
||||
@@ -1736,7 +1736,7 @@ QSortFilterProxyModel *Playlist::proxy() const { return proxy_; }
|
||||
|
||||
SongList Playlist::GetAllSongs() const {
|
||||
SongList ret;
|
||||
for (const PlaylistItemPtr &item : items_) {
|
||||
for (const PlaylistItemPtr item : items_) {
|
||||
ret << item->Metadata();
|
||||
}
|
||||
return ret;
|
||||
@@ -1746,7 +1746,7 @@ PlaylistItemList Playlist::GetAllItems() const { return items_; }
|
||||
|
||||
quint64 Playlist::GetTotalLength() const {
|
||||
quint64 ret = 0;
|
||||
for (const PlaylistItemPtr &item : items_) {
|
||||
for (const PlaylistItemPtr item : items_) {
|
||||
quint64 length = item->Metadata().length_nanosec();
|
||||
if (length > 0) ret += length;
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ void PlaylistBackend::SavePlaylist(int playlist, const PlaylistItemList &items,
|
||||
if (db_->CheckErrors(clear)) return;
|
||||
|
||||
// Save the new ones
|
||||
for (const PlaylistItemPtr &item : items) {
|
||||
for (const PlaylistItemPtr item : items) {
|
||||
insert.bindValue(":playlist", playlist);
|
||||
item->BindToQuery(&insert);
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ void PlaylistManager::SongsDiscovered(const SongList &songs) {
|
||||
for (const Song &song : songs) {
|
||||
for (const Data &data : playlists_) {
|
||||
PlaylistItemList items = data.p->collection_items_by_id(song.id());
|
||||
for (PlaylistItemPtr &item : items) {
|
||||
for (const PlaylistItemPtr item : items) {
|
||||
if (item->Metadata().directory_id() != song.directory_id()) continue;
|
||||
static_cast<CollectionPlaylistItem*>(item.get())->SetMetadata(song);
|
||||
data.p->ItemChanged(item);
|
||||
|
||||
Reference in New Issue
Block a user