Port back to "output" and "device" settings in lowercase
Was accidentally changed to capitalized.
This commit is contained in:
parent
b9b4e9f831
commit
8349a8b0ee
@ -26,9 +26,12 @@ namespace BackendSettings {
|
||||
|
||||
constexpr char kSettingsGroup[] = "Backend";
|
||||
|
||||
constexpr char kEngine[] = "Engine";
|
||||
constexpr char kOutput[] = "Output";
|
||||
constexpr char kDevice[] = "Device";
|
||||
constexpr char kEngine[] = "engine";
|
||||
constexpr char kEngineU[] = "Engine";
|
||||
constexpr char kOutput[] = "output";
|
||||
constexpr char kOutputU[] = "Output";
|
||||
constexpr char kDevice[] = "device";
|
||||
constexpr char kDeviceU[] = "Device";
|
||||
constexpr char kALSAPlugin[] = "alsaplugin";
|
||||
constexpr char kExclusiveMode[] = "exclusive_mode";
|
||||
constexpr char kVolumeControl[] = "volume_control";
|
||||
|
@ -142,8 +142,19 @@ void EngineBase::ReloadSettings() {
|
||||
|
||||
s.beginGroup(BackendSettings::kSettingsGroup);
|
||||
|
||||
output_ = s.value(BackendSettings::kOutput).toString();
|
||||
device_ = s.value(BackendSettings::kDevice);
|
||||
if (s.contains(BackendSettings::kOutputU)) {
|
||||
output_ = s.value(BackendSettings::kOutputU).toString();
|
||||
}
|
||||
else if (s.contains(BackendSettings::kOutput)) {
|
||||
output_ = s.value(BackendSettings::kOutput).toString();
|
||||
}
|
||||
|
||||
if (s.contains(BackendSettings::kDeviceU)) {
|
||||
device_ = s.value(BackendSettings::kDeviceU);
|
||||
}
|
||||
else if (s.contains(BackendSettings::kDevice)) {
|
||||
device_ = s.value(BackendSettings::kDevice);
|
||||
}
|
||||
|
||||
exclusive_mode_ = s.value(BackendSettings::kExclusiveMode, false).toBool();
|
||||
|
||||
|
@ -125,8 +125,19 @@ void BackendSettingsPage::Load() {
|
||||
Settings s;
|
||||
s.beginGroup(kSettingsGroup);
|
||||
|
||||
output_current_ = s.value(kOutput, QString()).toString();
|
||||
device_current_ = s.value(kDevice, QVariant());
|
||||
if (s.contains(kOutputU)) {
|
||||
output_current_ = s.value(kOutputU).toString();
|
||||
}
|
||||
else if (s.contains(kOutput)) {
|
||||
output_current_ = s.value(kOutput).toString();
|
||||
}
|
||||
|
||||
if (s.contains(kDeviceU)) {
|
||||
device_current_ = s.value(kDeviceU);
|
||||
}
|
||||
else if (s.contains(kDevice)) {
|
||||
device_current_ = s.value(kDevice);
|
||||
}
|
||||
|
||||
#ifdef HAVE_ALSA
|
||||
ui_->lineedit_device->show();
|
||||
@ -389,6 +400,20 @@ void BackendSettingsPage::Save() {
|
||||
Settings s;
|
||||
s.beginGroup(kSettingsGroup);
|
||||
|
||||
if (s.contains(kEngineU)) {
|
||||
s.remove(kEngineU);
|
||||
}
|
||||
if (s.contains(kEngine)) {
|
||||
s.remove(kEngine);
|
||||
}
|
||||
|
||||
if (s.contains(kOutputU)) {
|
||||
s.remove(kOutputU);
|
||||
}
|
||||
if (s.contains(kDeviceU)) {
|
||||
s.remove(kDeviceU);
|
||||
}
|
||||
|
||||
s.setValue(kOutput, output_name);
|
||||
s.setValue(kDevice, device_value);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user