mirror of
https://github.com/86Box/86Box.git
synced 2026-02-28 18:04:21 -07:00
clang-format in src/qt
This commit is contained in:
@@ -123,10 +123,10 @@ Harddrives::populateBusChannels(QAbstractItemModel *model, int bus, SettingsBusT
|
||||
{
|
||||
model->removeRows(0, model->rowCount());
|
||||
|
||||
int busRows = 0;
|
||||
int shifter = 1;
|
||||
int orer = 1;
|
||||
int subChannelWidth = 1;
|
||||
int busRows = 0;
|
||||
int shifter = 1;
|
||||
int orer = 1;
|
||||
int subChannelWidth = 1;
|
||||
QList<int> busesToCheck;
|
||||
QList<int> channelsInUse;
|
||||
switch (bus) {
|
||||
@@ -160,15 +160,15 @@ Harddrives::populateBusChannels(QAbstractItemModel *model, int bus, SettingsBusT
|
||||
busesToCheck.append(HDD_BUS_SCSI);
|
||||
break;
|
||||
case CDROM_BUS_MKE:
|
||||
shifter = 2;
|
||||
orer = 3;
|
||||
busRows = 4;
|
||||
shifter = 2;
|
||||
orer = 3;
|
||||
busRows = 4;
|
||||
busesToCheck.append(CDROM_BUS_MKE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(sbt != nullptr && !busesToCheck.empty()) {
|
||||
if (sbt != nullptr && !busesToCheck.empty()) {
|
||||
for (auto const &checkBus : busesToCheck) {
|
||||
channelsInUse.append(sbt->busChannelsInUse(checkBus));
|
||||
}
|
||||
@@ -179,9 +179,9 @@ Harddrives::populateBusChannels(QAbstractItemModel *model, int bus, SettingsBusT
|
||||
auto idx = model->index(i, 0);
|
||||
model->setData(idx, QString("%1:%2").arg(i >> shifter).arg(i & orer, subChannelWidth, 10, QChar('0')));
|
||||
model->setData(idx, ((i >> shifter) << shifter) | (i & orer), Qt::UserRole);
|
||||
const auto *channelModel = qobject_cast<QStandardItemModel*>(model);
|
||||
auto *channelItem = channelModel->item(i);
|
||||
if(channelItem) {
|
||||
const auto *channelModel = qobject_cast<QStandardItemModel *>(model);
|
||||
auto *channelItem = channelModel->item(i);
|
||||
if (channelItem) {
|
||||
channelItem->setEnabled(!channelsInUse.contains(i));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user