[tracking] Reduce compile warnings
The fallthrough construction in a switch is a bit confusing to read, and generates compile warnings too, so break it up.
This commit is contained in:
parent
defc7d4df8
commit
e2f6d160f8
@ -90,17 +90,20 @@ bool TrackingPage::getTrackingOption(TrackingType t)
|
||||
|
||||
// A tracking type is enabled if it is checked, or
|
||||
// any higher level is checked.
|
||||
#define ch(x) ui->x->isChecked()
|
||||
switch ( t )
|
||||
{
|
||||
case TrackingType::InstallTracking:
|
||||
enabled |= ui->installRadio->isChecked();
|
||||
// FALLTHRU
|
||||
enabled = ch(installRadio) || ch(machineRadio) || ch(userRadio);
|
||||
break;
|
||||
case TrackingType::MachineTracking:
|
||||
enabled |= ui->machineRadio->isChecked();
|
||||
// FALLTHRU
|
||||
enabled = ch(machineRadio) || ch(userRadio);
|
||||
break;
|
||||
case TrackingType::UserTracking:
|
||||
enabled |= ui->userRadio->isChecked();
|
||||
enabled = ch(userRadio);
|
||||
break;
|
||||
}
|
||||
#undef ch
|
||||
return enabled;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user