summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-10-27 22:54:32 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-10-27 23:07:32 +0100
commitc60e8e727dcbd878c8aea08240c7df7defec7c4e (patch)
tree801a076ef7abbe07d6f3d1d5ca64ed4901e596b6 /src/engine
parent48c8b3092775ba766a468e6e8e924a5b1ad91a5b (diff)
Replace implicit casts with ControlObject::toBool() in more places
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/sync/synccontrol.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}