diff --git a/src/qt/qt_settingsstoragecontrollers.cpp b/src/qt/qt_settingsstoragecontrollers.cpp index 48fa04892..2af7bd080 100644 --- a/src/qt/qt_settingsstoragecontrollers.cpp +++ b/src/qt/qt_settingsstoragecontrollers.cpp @@ -84,18 +84,16 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) } QString name = DeviceConfig::DeviceName(hdc_get_device(c), hdc_get_internal_name(c), 1); - if (name.isEmpty()) { + if (name.isEmpty()) break; - } if (hdc_available(c)) { const device_t *hdc_dev = hdc_get_device(c); if (device_is_valid(hdc_dev, machineId)) { int row = Models::AddEntry(model, name, c); - if (c == hdc_current[0]) { + if (c == hdc_current[0]) selectedRow = row - removeRows; - } } } c++; @@ -105,7 +103,7 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) ui->comboBoxHD->setCurrentIndex(-1); ui->comboBoxHD->setCurrentIndex(selectedRow); - /*FD controller config*/ + /* FD controller config */ model = ui->comboBoxFD->model(); removeRows = model->rowCount(); c = 0; @@ -143,11 +141,11 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) /*CD interface controller config*/ #ifdef USE_CDROM_MITSUMI - ui->label_7->setVisible(true); + ui->labelCDInterface->setVisible(true); ui->comboBoxCDInterface->setVisible(true); ui->pushButtonCDInterface->setVisible(true); #else - ui->label_7->setVisible(false); + ui->labelCDInterface->setVisible(false); ui->comboBoxCDInterface->setVisible(false); ui->pushButtonCDInterface->setVisible(false); #endif @@ -242,27 +240,27 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) void SettingsStorageControllers::on_comboBoxHD_currentIndexChanged(int index) { - if (index < 0) { + if (index < 0) return; - } + ui->pushButtonHD->setEnabled(hdc_has_config(ui->comboBoxHD->currentData().toInt()) > 0); } void SettingsStorageControllers::on_comboBoxFD_currentIndexChanged(int index) { - if (index < 0) { + if (index < 0) return; - } + ui->pushButtonFD->setEnabled(hdc_has_config(ui->comboBoxFD->currentData().toInt()) > 0); } void SettingsStorageControllers::on_comboBoxCDInterface_currentIndexChanged(int index) { - if (index < 0) { + if (index < 0) return; - } + ui->pushButtonCDInterface->setEnabled(cdrom_interface_has_config(ui->comboBoxCDInterface->currentData().toInt()) > 0); } @@ -311,36 +309,36 @@ SettingsStorageControllers::on_pushButtonQuaternaryIDE_clicked() void SettingsStorageControllers::on_comboBoxSCSI1_currentIndexChanged(int index) { - if (index < 0) { + if (index < 0) return; - } + ui->pushButtonSCSI1->setEnabled(scsi_card_has_config(ui->comboBoxSCSI1->currentData().toInt()) > 0); } void SettingsStorageControllers::on_comboBoxSCSI2_currentIndexChanged(int index) { - if (index < 0) { + if (index < 0) return; - } + ui->pushButtonSCSI2->setEnabled(scsi_card_has_config(ui->comboBoxSCSI2->currentData().toInt()) > 0); } void SettingsStorageControllers::on_comboBoxSCSI3_currentIndexChanged(int index) { - if (index < 0) { + if (index < 0) return; - } + ui->pushButtonSCSI3->setEnabled(scsi_card_has_config(ui->comboBoxSCSI3->currentData().toInt()) > 0); } void SettingsStorageControllers::on_comboBoxSCSI4_currentIndexChanged(int index) { - if (index < 0) { + if (index < 0) return; - } + ui->pushButtonSCSI4->setEnabled(scsi_card_has_config(ui->comboBoxSCSI4->currentData().toInt()) > 0); } diff --git a/src/qt/qt_settingsstoragecontrollers.hpp b/src/qt/qt_settingsstoragecontrollers.hpp index c50a94574..6774bb504 100644 --- a/src/qt/qt_settingsstoragecontrollers.hpp +++ b/src/qt/qt_settingsstoragecontrollers.hpp @@ -20,27 +20,31 @@ public slots: void onCurrentMachineChanged(int machineId); private slots: - void on_pushButtonSCSI4_clicked(); - void on_pushButtonSCSI3_clicked(); - void on_pushButtonSCSI2_clicked(); - void on_pushButtonSCSI1_clicked(); - void on_comboBoxSCSI4_currentIndexChanged(int index); - void on_comboBoxSCSI3_currentIndexChanged(int index); - void on_comboBoxSCSI2_currentIndexChanged(int index); - void on_comboBoxSCSI1_currentIndexChanged(int index); - void on_pushButtonQuaternaryIDE_clicked(); - void on_pushButtonTertiaryIDE_clicked(); - void on_pushButtonFD_clicked(); - void on_pushButtonHD_clicked(); - void on_pushButtonCDInterface_clicked(); - void on_checkBoxQuaternaryIDE_stateChanged(int arg1); - void on_checkBoxTertiaryIDE_stateChanged(int arg1); - void on_comboBoxFD_currentIndexChanged(int index); void on_comboBoxHD_currentIndexChanged(int index); + void on_pushButtonHD_clicked(); + + void on_comboBoxFD_currentIndexChanged(int index); + void on_pushButtonFD_clicked(); + void on_comboBoxCDInterface_currentIndexChanged(int index); + void on_pushButtonCDInterface_clicked(); + + void on_checkBoxTertiaryIDE_stateChanged(int arg1); + void on_pushButtonTertiaryIDE_clicked(); + + void on_checkBoxQuaternaryIDE_stateChanged(int arg1); + void on_pushButtonQuaternaryIDE_clicked(); + + void on_comboBoxSCSI1_currentIndexChanged(int index); + void on_pushButtonSCSI1_clicked(); + void on_comboBoxSCSI2_currentIndexChanged(int index); + void on_pushButtonSCSI2_clicked(); + void on_comboBoxSCSI3_currentIndexChanged(int index); + void on_pushButtonSCSI3_clicked(); + void on_comboBoxSCSI4_currentIndexChanged(int index); + void on_pushButtonSCSI4_clicked(); void on_checkBoxLbaEnhancer_stateChanged(int arg1); - void on_pushButtonConfigureLbaEnhancer_clicked(); private: diff --git a/src/qt/qt_settingsstoragecontrollers.ui b/src/qt/qt_settingsstoragecontrollers.ui index a167e5bc1..04a87c1d5 100644 --- a/src/qt/qt_settingsstoragecontrollers.ui +++ b/src/qt/qt_settingsstoragecontrollers.ui @@ -29,47 +29,12 @@ - + HD Controller: - - - - Configure - - - - - - - FD Controller: - - - - - - - CD-ROM Controller: - - - - - - - 30 - - - - - - - Configure - - - @@ -90,6 +55,13 @@ + + + + FD Controller: + + + @@ -97,6 +69,34 @@ + + + + Configure + + + + + + + CD-ROM Controller: + + + + + + + 30 + + + + + + + Configure + + + @@ -104,13 +104,6 @@ - - - - Quaternary IDE Controller - - - @@ -121,6 +114,13 @@ + + + + Quaternary IDE Controller + + + @@ -134,29 +134,15 @@ - + SCSI - - - + + + - Configure - - - - - - - Configure - - - - - - - Controller 3: + Controller 1: @@ -180,6 +166,13 @@ + + + + Controller 2: + + + @@ -193,6 +186,20 @@ + + + + Configure + + + + + + + Controller 3: + + + @@ -206,6 +213,20 @@ + + + + Configure + + + + + + + Controller 4: + + + @@ -219,29 +240,8 @@ - - - - Controller 1: - - - - - - - Controller 2: - - - - - - - Controller 4: - - - - - + + Configure