summaryrefslogtreecommitdiffstats
path: root/src/preferences/dialog
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-12-15 01:05:33 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-12-15 01:57:06 +0100
commit0471998e13aada9a76e92b13ab3885c2d1c2fb84 (patch)
tree776d15ab92ef044956940bc2228b61256ca4feb9 /src/preferences/dialog
parent63b858b5d827797eec959d009ad0b970de167dc5 (diff)
Add missing braces around single-line statements
Diffstat (limited to 'src/preferences/dialog')
-rw-r--r--src/preferences/dialog/dlgprefbroadcast.cpp3
-rw-r--r--src/preferences/dialog/dlgpreferences.cpp3
-rw-r--r--src/preferences/dialog/dlgprefmodplug.cpp15
-rw-r--r--src/preferences/dialog/dlgprefsound.cpp12
-rw-r--r--src/preferences/dialog/dlgprefsounditem.cpp4
-rw-r--r--src/preferences/dialog/dlgprefvinyl.cpp25
6 files changed, 42 insertions, 20 deletions
diff --git a/src/preferences/dialog/dlgprefbroadcast.cpp b/src/preferences/dialog/dlgprefbroadcast.cpp
index f06add02c1..0c63359cbd 100644
--- a/src/preferences/dialog/dlgprefbroadcast.cpp
+++ b/src/preferences/dialog/dlgprefbroadcast.cpp
@@ -504,8 +504,9 @@ void DlgPrefBroadcast::getValuesFromProfile(BroadcastProfilePtr profile) {
}
void DlgPrefBroadcast::setValuesToProfile(BroadcastProfilePtr profile) {
- if (!profile)
+ if (!profile) {
return;
+ }
profile->setSecureCredentialStorage(rbPasswordKeychain->isChecked());
diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp
index 8d3fa0d427..e1351253d8 100644
--- a/src/preferences/dialog/dlgpreferences.cpp
+++ b/src/preferences/dialog/dlgpreferences.cpp
@@ -310,8 +310,9 @@ void DlgPreferences::createIcons() {
}
void DlgPreferences::changePage(QTreeWidgetItem* current, QTreeWidgetItem* previous) {
- if (!current)
+ if (!current) {
current = previous;
+ }
if (current == m_pSoundButton) {
switchToPage(m_soundPage);
diff --git a/src/preferences/dialog/dlgprefmodplug.cpp b/src/preferences/dialog/dlgprefmodplug.cpp
index f3c28fc221..3fac78ee81 100644
--- a/src/preferences/dialog/dlgprefmodplug.cpp
+++ b/src/preferences/dialog/dlgprefmodplug.cpp
@@ -146,16 +146,21 @@ void DlgPrefModplug::applySettings() {
// enabled features flags
settings.mFlags = 0;
- if (m_pUi->oversampling->isChecked())
+ if (m_pUi->oversampling->isChecked()) {
settings.mFlags |= ModPlug::MODPLUG_ENABLE_OVERSAMPLING;
- if (m_pUi->noiseReduction->isChecked())
+ }
+ if (m_pUi->noiseReduction->isChecked()) {
settings.mFlags |= ModPlug::MODPLUG_ENABLE_NOISE_REDUCTION;
- if (m_pUi->reverb->isChecked())
+ }
+ if (m_pUi->reverb->isChecked()) {
settings.mFlags |= ModPlug::MODPLUG_ENABLE_REVERB;
- if (m_pUi->megabass->isChecked())
+ }
+ if (m_pUi->megabass->isChecked()) {
settings.mFlags |= ModPlug::MODPLUG_ENABLE_MEGABASS;
- if (m_pUi->surround->isChecked())
+ }
+ if (m_pUi->surround->isChecked()) {
settings.mFlags |= ModPlug::MODPLUG_ENABLE_SURROUND;
+ }
switch (m_pUi->resampleMode->currentIndex()) {
case 0: // nearest neighbor
diff --git a/src/preferences/dialog/dlgprefsound.cpp b/src/preferences/dialog/dlgprefsound.cpp
index 7b57b6a33e..077fd2cab0 100644
--- a/src/preferences/dialog/dlgprefsound.cpp
+++ b/src/preferences/dialog/dlgprefsound.cpp
@@ -405,7 +405,9 @@ void DlgPrefSound::insertItem(DlgPrefSoundItem *pItem, QVBoxLayout *pLayout) {
for (pos = 0; pos < pLayout->count() - 1; ++pos) {
DlgPrefSoundItem *pOther(qobject_cast<DlgPrefSoundItem*>(
pLayout->itemAt(pos)->widget()));
- if (!pOther) continue;
+ if (!pOther) {
+ continue;
+ }
if (pItem->type() < pOther->type()) {
break;
} else if (pItem->type() == pOther->type()
@@ -628,12 +630,16 @@ void DlgPrefSound::refreshDevices() {
* DlgPrefSound::slotApply knows to apply them.
*/
void DlgPrefSound::settingChanged() {
- if (m_loading) return; // doesn't count if we're just loading prefs
+ if (m_loading) {
+ return; // doesn't count if we're just loading prefs
+ }
m_settingsModified = true;
}
void DlgPrefSound::deviceSettingChanged() {
- if (m_loading) return;
+ if (m_loading) {
+ return;
+ }
checkLatencyCompensation();
m_settingsModified = true;
}
diff --git a/src/preferences/dialog/dlgprefsounditem.cpp b/src/preferences/dialog/dlgprefsounditem.cpp
index e493d60855..8efa2d3c04 100644
--- a/src/preferences/dialog/dlgprefsounditem.cpp
+++ b/src/preferences/dialog/dlgprefsounditem.cpp
@@ -80,7 +80,9 @@ void DlgPrefSoundItem::refreshDevices(const QList<SoundDevicePointer>& devices)
deviceComboBox->removeItem(deviceComboBox->count() - 1);
}
for (const auto& pDevice: qAsConst(m_devices)) {
- if (!hasSufficientChannels(*pDevice)) continue;
+ if (!hasSufficientChannels(*pDevice)) {
+ continue;
+ }
deviceComboBox->addItem(pDevice->getDisplayName(), QVariant::fromValue(pDevice->getDeviceId()));
}
int newIndex = deviceComboBox->findData(QVariant::fromValue(oldDev));
diff --git a/src/preferences/dialog/dlgprefvinyl.cpp b/src/preferences/dialog/dlgprefvinyl.cpp
index 31c09ba830..bc71880bab 100644
--- a/src/preferences/dialog/dlgprefvinyl.cpp
+++ b/src/preferences/dialog/dlgprefvinyl.cpp
@@ -197,51 +197,58 @@ void DlgPrefVinyl::slotUpdate() {
int combo_index =
ComboBoxVinylType1->findText(config->getValueString(
ConfigKey("[Channel1]", "vinylcontrol_vinyl_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylType1->setCurrentIndex(combo_index);
+ }
combo_index =
ComboBoxVinylType2->findText(config->getValueString(
ConfigKey("[Channel2]", "vinylcontrol_vinyl_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylType2->setCurrentIndex(combo_index);
+ }
combo_index =
ComboBoxVinylType3->findText(config->getValueString(
ConfigKey("[Channel3]", "vinylcontrol_vinyl_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylType3->setCurrentIndex(combo_index);
+ }
combo_index =
ComboBoxVinylType4->findText(config->getValueString(
ConfigKey("[Channel4]", "vinylcontrol_vinyl_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylType4->setCurrentIndex(combo_index);
-
+ }
combo_index =
ComboBoxVinylSpeed1->findText(config->getValueString(
ConfigKey("[Channel1]", "vinylcontrol_speed_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylSpeed1->setCurrentIndex(combo_index);
+ }
combo_index =
ComboBoxVinylSpeed2->findText(config->getValueString(
ConfigKey("[Channel2]", "vinylcontrol_speed_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylSpeed2->setCurrentIndex(combo_index);
+ }
combo_index =
ComboBoxVinylSpeed3->findText(config->getValueString(
ConfigKey("[Channel3]", "vinylcontrol_speed_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylSpeed3->setCurrentIndex(combo_index);
+ }
combo_index =
ComboBoxVinylSpeed4->findText(config->getValueString(
ConfigKey("[Channel4]", "vinylcontrol_speed_type")));
- if (combo_index != -1)
+ if (combo_index != -1) {
ComboBoxVinylSpeed4->setCurrentIndex(combo_index);
+ }
// set lead-in time
LeadinTime1->setValue((config->getValue(ConfigKey("[Channel1]", "vinylcontrol_lead_in_time"), "0")).toInt());