From c60e8e727dcbd878c8aea08240c7df7defec7c4e Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Tue, 27 Oct 2020 22:54:32 +0100 Subject: Replace implicit casts with ControlObject::toBool() in more places --- src/engine/sync/synccontrol.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/engine') diff --git a/src/engine/sync/synccontrol.cpp b/src/engine/sync/synccontrol.cpp index d06b212ee3..1f6c842d01 100644 --- a/src/engine/sync/synccontrol.cpp +++ b/src/engine/sync/synccontrol.cpp @@ -130,12 +130,12 @@ void SyncControl::setSyncMode(SyncMode mode) { m_pSyncEnabled->setAndConfirm(mode != SYNC_NONE); m_pSyncMasterEnabled->setAndConfirm(isMaster(mode)); if (mode == SYNC_FOLLOWER) { - if (m_pVCEnabled && m_pVCEnabled->get()) { + if (m_pVCEnabled && m_pVCEnabled->toBool()) { // If follower mode is enabled, disable vinyl control. m_pVCEnabled->set(0.0); } } - if (mode != SYNC_NONE && m_pPassthroughEnabled->get()) { + if (mode != SYNC_NONE && m_pPassthroughEnabled->toBool()) { // If any sync mode is enabled and passthrough was on somehow, disable passthrough. // This is very unlikely to happen so this deserves a warning. qWarning() << "Notified of sync mode change when passthrough was " @@ -389,7 +389,7 @@ void SyncControl::slotSyncModeChangeRequest(double state) { kLogger.trace() << getGroup() << "SyncControl::slotSyncModeChangeRequest"; } SyncMode mode = syncModeFromDouble(state); - if (m_pPassthroughEnabled->get() && mode != SYNC_NONE) { + if (m_pPassthroughEnabled->toBool() && mode != SYNC_NONE) { qDebug() << "Disallowing enabling of sync mode when passthrough active"; } else { m_pChannel->getEngineBuffer()->requestSyncMode(mode); @@ -402,7 +402,7 @@ void SyncControl::slotSyncMasterEnabledChangeRequest(double state) { // Already master. return; } - if (m_pPassthroughEnabled->get()) { + if (m_pPassthroughEnabled->toBool()) { qDebug() << "Disallowing enabling of sync mode when passthrough active"; return; } @@ -418,7 +418,7 @@ void SyncControl::slotSyncEnabledChangeRequest(double enabled) { // Allow a request for state change even if it's the same as the current // state. We might have toggled on and off in the space of one buffer. - if (bEnabled && m_pPassthroughEnabled->get()) { + if (bEnabled && m_pPassthroughEnabled->toBool()) { qDebug() << "Disallowing enabling of sync mode when passthrough active"; return; } -- cgit v1.2.3