Skip to content

Commit

Permalink
AutoDJFeature: fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Feb 29, 2024
1 parent 9995a5a commit 778c5e8
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions src/library/autodj/autodjfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,54 +46,54 @@ AutoDJFeature::AutoDJFeature(Library* pLibrary,
m_pAutoDJView(nullptr),
m_viewName(Library::kAutoDJViewName),
m_autoDjCratesDao(m_iAutoDJPlaylistId, pLibrary->trackCollectionManager(), m_pConfig) {
qRegisterMetaType<AutoDJProcessor::AutoDJState>("AutoDJState");
m_pAutoDJProcessor = new AutoDJProcessor(this,
m_pConfig,
pPlayerManager,
pLibrary->trackCollectionManager(),
m_iAutoDJPlaylistId);
qRegisterMetaType<AutoDJProcessor::AutoDJState>("AutoDJState");
m_pAutoDJProcessor = new AutoDJProcessor(this,
m_pConfig,
pPlayerManager,
pLibrary->trackCollectionManager(),
m_iAutoDJPlaylistId);

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

m_playlistDao.setAutoDJProcessor(m_pAutoDJProcessor);
m_playlistDao.setAutoDJProcessor(m_pAutoDJProcessor);

// Create the "Crates" tree-item under the root item.
std::unique_ptr<TreeItem> pRootItem = TreeItem::newRoot(this);
m_pCratesTreeItem = pRootItem->appendChild(tr("Crates"));
m_pCratesTreeItem->setIcon(QIcon(":/images/library/ic_library_crates.svg"));
// Create the "Crates" tree-item under the root item.
std::unique_ptr<TreeItem> pRootItem = TreeItem::newRoot(this);
m_pCratesTreeItem = pRootItem->appendChild(tr("Crates"));
m_pCratesTreeItem->setIcon(QIcon(":/images/library/ic_library_crates.svg"));

// Create tree-items under "Crates".
constructCrateChildModel();
// Create tree-items under "Crates".
constructCrateChildModel();

m_pSidebarModel->setRootItem(std::move(pRootItem));
m_pSidebarModel->setRootItem(std::move(pRootItem));

// Be notified when the status of crates changes.
connect(m_pTrackCollection,
&TrackCollection::crateInserted,
this,
&AutoDJFeature::slotCrateChanged);
connect(m_pTrackCollection,
&TrackCollection::crateUpdated,
this,
&AutoDJFeature::slotCrateChanged);
connect(m_pTrackCollection,
&TrackCollection::crateDeleted,
this,
&AutoDJFeature::slotCrateChanged);
// Be notified when the status of crates changes.
connect(m_pTrackCollection,
&TrackCollection::crateInserted,
this,
&AutoDJFeature::slotCrateChanged);
connect(m_pTrackCollection,
&TrackCollection::crateUpdated,
this,
&AutoDJFeature::slotCrateChanged);
connect(m_pTrackCollection,
&TrackCollection::crateDeleted,
this,
&AutoDJFeature::slotCrateChanged);

// Create context-menu items to allow crates to be added to, and removed
// from, the auto-DJ queue.
m_pRemoveCrateFromAutoDj = new QAction(tr("Remove Crate as Track Source"), this);
connect(m_pRemoveCrateFromAutoDj,
&QAction::triggered,
this,
&AutoDJFeature::slotRemoveCrateFromAutoDj);
// Create context-menu items to allow crates to be added to, and removed
// from, the auto-DJ queue.
m_pRemoveCrateFromAutoDj = new QAction(tr("Remove Crate as Track Source"), this);
connect(m_pRemoveCrateFromAutoDj,
&QAction::triggered,
this,
&AutoDJFeature::slotRemoveCrateFromAutoDj);
}

AutoDJFeature::~AutoDJFeature() {
Expand Down

0 comments on commit 778c5e8

Please sign in to comment.