Code cleanup.

This commit is contained in:
Jonas Kvinge
2018-03-10 13:02:56 +01:00
parent 07a95b56ff
commit 16cabf33a2
25 changed files with 179 additions and 590 deletions

View File

@@ -435,11 +435,13 @@ void PlaylistManager::SelectionChanged(const QItemSelection &selection) {
}
void PlaylistManager::SongsDiscovered(const SongList &songs) {
qLog(Debug) << __PRETTY_FUNCTION__;
// Some songs might've changed in the collection, let's update any playlist
// items we have that match those songs
// Some songs might've changed in the collection, let's update any playlist items we have that match those songs
for (const Song &song : songs) {
qLog(Debug);
for (const Data &data : playlists_) {
PlaylistItemList items = data.p->collection_items_by_id(song.id());
for (PlaylistItemPtr item : items) {

View File

@@ -134,8 +134,7 @@ void SongLoaderInserter::AsyncLoad() {
// First, quick load raw songs.
int async_progress = 0;
int async_load_id = task_manager_->StartTask(tr("Loading tracks"));
task_manager_->SetTaskProgress(async_load_id, async_progress,
pending_.count());
task_manager_->SetTaskProgress(async_load_id, async_progress, pending_.count());
for (int i = 0; i < pending_.count(); ++i) {
SongLoader *loader = pending_[i];
loader->LoadFilenamesBlocking();