refactor: Action LockCursorMode => Action::LockCursorMode enum class

This commit is contained in:
sithlord48
2025-08-14 19:47:06 -04:00
committed by Nick Bolton
parent ea6f4ce221
commit 0d7d21aeb2
2 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ void Action::loadSettings(QSettings &settings)
setSwitchScreenName(settings.value(SettingsKeys::SwitchToScreen).toString());
setSwitchDirection(settings.value(SettingsKeys::SwitchDirection, static_cast<int>(SwitchDirection::left)).toInt());
setLockCursorMode(settings.value(SettingsKeys::LockToScreen, lockCursorToggle).toInt());
setLockCursorMode(settings.value(SettingsKeys::LockToScreen, static_cast<int>(LockCursorMode::toggle)).toInt());
setActiveOnRelease(settings.value(SettingsKeys::ActiveOnRelease, false).toBool());
setHaveScreens(settings.value(SettingsKeys::HasScreens, false).toBool());
setRestartServer(settings.value(SettingsKeys::RestartServer, false).toBool());

View File

@ -55,11 +55,11 @@ public:
up,
down
};
enum LockCursorMode
enum class LockCursorMode
{
lockCursorToggle,
lockCursonOn,
lockCursorOff
toggle,
on,
off
};
public:
@ -155,7 +155,7 @@ private:
QStringList m_typeScreenNames = QStringList();
QString m_switchScreenName = QString();
int m_switchDirection = static_cast<int>(SwitchDirection::left);
int m_lockCursorMode = lockCursorToggle;
int m_lockCursorMode = static_cast<int>(LockCursorMode::toggle);
bool m_activeOnRelease = false;
bool m_hasScreens = false;
bool m_restartServer;