mirror of
https://github.com/86Box/86Box.git
synced 2026-02-28 01:44:22 -07:00
clang-format in src/qt
This commit is contained in:
@@ -53,7 +53,7 @@ SettingsPorts::save()
|
||||
auto *cbox = findChild<QComboBox *>(QString("comboBoxLpt%1").arg(i + 1));
|
||||
auto *checkBox = findChild<QCheckBox *>(QString("checkBoxParallel%1").arg(i + 1));
|
||||
if (cbox != NULL)
|
||||
lpt_ports[i].device = cbox->currentData().toInt();
|
||||
lpt_ports[i].device = cbox->currentData().toInt();
|
||||
if (checkBox != NULL)
|
||||
lpt_ports[i].enabled = checkBox->isChecked() ? 1 : 0;
|
||||
}
|
||||
@@ -73,21 +73,20 @@ SettingsPorts::onCurrentMachineChanged(int machineId)
|
||||
{
|
||||
this->machineId = machineId;
|
||||
|
||||
int c = 0;
|
||||
int c = 0;
|
||||
|
||||
auto *lptEcpDmaModel = ui->comboBoxLptECPDMA->model();
|
||||
auto removeRowsEcpDma = lptEcpDmaModel->rowCount();
|
||||
|
||||
int has_jumpers = !!machine_has_jumpered_ecp_dma(machineId, DMA_ANY);
|
||||
int has_jumpers = !!machine_has_jumpered_ecp_dma(machineId, DMA_ANY);
|
||||
|
||||
int selectedRow = -2;
|
||||
int first = -2;
|
||||
int selectedRow = -2;
|
||||
int first = -2;
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
int j = machine_map_jumpered_ecp_dma(i);
|
||||
int j = machine_map_jumpered_ecp_dma(i);
|
||||
|
||||
if ((has_jumpers && ((j == DMA_NONE) || !machine_has_jumpered_ecp_dma(machineId, j))) ||
|
||||
(!has_jumpers && (j != DMA_NONE)))
|
||||
if ((has_jumpers && ((j == DMA_NONE) || !machine_has_jumpered_ecp_dma(machineId, j))) || (!has_jumpers && (j != DMA_NONE)))
|
||||
continue;
|
||||
|
||||
if (first == -2)
|
||||
@@ -122,7 +121,7 @@ SettingsPorts::onCurrentMachineChanged(int machineId)
|
||||
c = 0;
|
||||
|
||||
// LPT Device
|
||||
QComboBox * cbox[PARALLEL_MAX] = { 0 };
|
||||
QComboBox *cbox[PARALLEL_MAX] = { 0 };
|
||||
QAbstractItemModel *models[PARALLEL_MAX] = { 0 };
|
||||
int removeRows_[PARALLEL_MAX] = { 0 };
|
||||
int selectedRows[PARALLEL_MAX] = { 0 };
|
||||
@@ -134,12 +133,12 @@ SettingsPorts::onCurrentMachineChanged(int machineId)
|
||||
}
|
||||
|
||||
while (true) {
|
||||
const char *lptName = lpt_device_get_name(c);
|
||||
const char *lptName = lpt_device_get_name(c);
|
||||
|
||||
if (lptName == nullptr)
|
||||
break;
|
||||
|
||||
const QString name = tr(lptName);
|
||||
const QString name = tr(lptName);
|
||||
|
||||
for (uint8_t i = 0; i < PARALLEL_MAX; ++i) {
|
||||
int row = Models::AddEntry(models[i], name, c);
|
||||
@@ -148,7 +147,7 @@ SettingsPorts::onCurrentMachineChanged(int machineId)
|
||||
selectedRows[i] = row - removeRows_[i];
|
||||
}
|
||||
|
||||
c++;
|
||||
c++;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < PARALLEL_MAX; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user