refactor: Fixes, Use enum instead of cast to int
This commit is contained in:
committed by
Nick Bolton
parent
2b3ecd39c6
commit
8526facbe9
@ -145,9 +145,9 @@ protected:
|
||||
{
|
||||
m_SwitchCornerSize = val;
|
||||
}
|
||||
void setFix(int f, bool on)
|
||||
void setFix(Fix f, bool on)
|
||||
{
|
||||
m_Fixes[f] = on;
|
||||
m_Fixes[static_cast<int8_t>(f)] = on;
|
||||
}
|
||||
QList<bool> &fixes()
|
||||
{
|
||||
|
||||
@ -108,10 +108,10 @@ void ScreenSettingsDialog::accept()
|
||||
m_pScreen->setSwitchCorner(BottomRight, ui_->m_pCheckBoxCornerBottomRight->isChecked());
|
||||
m_pScreen->setSwitchCornerSize(ui_->m_pSpinBoxSwitchCornerSize->value());
|
||||
|
||||
m_pScreen->setFix(static_cast<int>(CapsLock), ui_->m_pCheckBoxCapsLock->isChecked());
|
||||
m_pScreen->setFix(static_cast<int>(NumLock), ui_->m_pCheckBoxNumLock->isChecked());
|
||||
m_pScreen->setFix(static_cast<int>(ScrollLock), ui_->m_pCheckBoxScrollLock->isChecked());
|
||||
m_pScreen->setFix(static_cast<int>(XTest), ui_->m_pCheckBoxXTest->isChecked());
|
||||
m_pScreen->setFix(CapsLock, ui_->m_pCheckBoxCapsLock->isChecked());
|
||||
m_pScreen->setFix(NumLock, ui_->m_pCheckBoxNumLock->isChecked());
|
||||
m_pScreen->setFix(ScrollLock, ui_->m_pCheckBoxScrollLock->isChecked());
|
||||
m_pScreen->setFix(XTest, ui_->m_pCheckBoxXTest->isChecked());
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user