[Companion] HardwarePanel - fix saving of Bluetooth Mode selection (and related Qt warning), introduced in a87722b.

This commit is contained in:
Max Paperno
2018-06-02 21:10:51 -04:00
parent 40c5f0432c
commit cd8f006d31
3 changed files with 3 additions and 9 deletions
+2 -7
View File
@@ -158,7 +158,8 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
}
if (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) || IS_HORUS(board)) {
ui->bluetoothMode->setCurrentIndex(generalSettings.bluetoothMode);
ui->bluetoothMode->setAutoIndexes();
ui->bluetoothMode->setField(generalSettings.bluetoothMode, this);
ui->bluetoothName->setField(generalSettings.bluetoothName, 10, this);
}
else {
@@ -238,12 +239,6 @@ void HardwarePanel::on_txCurrentCalibration_editingFinished()
}
}
void HardwarePanel::on_bluetoothMode_stateChanged(int index)
{
generalSettings.bluetoothMode = index;
emit modified();
}
void HardwarePanel::setValues()
{
ui->txVoltageCalibration->setValue((double)generalSettings.txVoltageCalibration/10);
-1
View File
@@ -48,7 +48,6 @@ class HardwarePanel : public GeneralPanel
void on_txCurrentCalibration_editingFinished();
void on_txVoltageCalibration_editingFinished();
void on_bluetoothMode_stateChanged(int);
void on_filterEnable_stateChanged();
void on_serialPortMode_currentIndexChanged(int index);
+1 -1
View File
@@ -1099,7 +1099,7 @@
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="bluetoothMode">
<widget class="AutoComboBox" name="bluetoothMode">
<property name="text" stdset="0">
<string/>
</property>