Skip to content

Commit

Permalink
Use queued connections for automatically loading new tracks from Auto…
Browse files Browse the repository at this point in the history
…DJPorcessor

This ensures that the stack of slots connected to the original signal is fully processed.
Fixes https://bugs.launchpad.net/mixxx/+bug/1941743
  • Loading branch information
daschuer committed Sep 7, 2021
1 parent c92040f commit 1e0e347
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/library/autodj/autodjfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ AutoDJFeature::AutoDJFeature(Library* pLibrary,
qRegisterMetaType<AutoDJProcessor::AutoDJState>("AutoDJState");
m_pAutoDJProcessor = new AutoDJProcessor(
this, m_pConfig, pPlayerManager, pLibrary->trackCollections(), m_iAutoDJPlaylistId);

// Connect loadTrackToPlayer signal as a queued connection to make sure all callbacks of a
// previous load attempt have been called (lp1941743)
connect(m_pAutoDJProcessor,
&AutoDJProcessor::loadTrackToPlayer,
this,
&LibraryFeature::loadTrackToPlayer);
&LibraryFeature::loadTrackToPlayer,
Qt::QueuedConnection);

m_playlistDao.setAutoDJProcessor(m_pAutoDJProcessor);

// Create the "Crates" tree-item under the root item.
Expand Down

0 comments on commit 1e0e347

Please sign in to comment.