From 1d43e7c62601a997f7e6e0d6d64b7c9ad2f37703 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Wed, 27 Nov 2024 08:54:23 -0500 Subject: [PATCH] chore: src/gui/Action initilize items in class when possible --- src/gui/src/Action.cpp | 8 -------- src/gui/src/Action.h | 14 +++++++------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/gui/src/Action.cpp b/src/gui/src/Action.cpp index 73647ace5..f7ca16a09 100644 --- a/src/gui/src/Action.cpp +++ b/src/gui/src/Action.cpp @@ -30,14 +30,6 @@ const char *Action::m_SwitchDirectionNames[] = {"left", "right", "up", "down"}; const char *Action::m_LockCursorModeNames[] = {"toggle", "on", "off"}; Action::Action() - : m_KeySequence(), - m_Type(keystroke), - m_TypeScreenNames(), - m_SwitchScreenName(), - m_SwitchDirection(switchLeft), - m_LockCursorMode(lockCursorToggle), - m_ActiveOnRelease(false), - m_HasScreens(false) { } diff --git a/src/gui/src/Action.h b/src/gui/src/Action.h index b2e9febf7..7cc0d16d8 100644 --- a/src/gui/src/Action.h +++ b/src/gui/src/Action.h @@ -151,13 +151,13 @@ protected: private: KeySequence m_KeySequence; - int m_Type; - QStringList m_TypeScreenNames; - QString m_SwitchScreenName; - int m_SwitchDirection; - int m_LockCursorMode; - bool m_ActiveOnRelease; - bool m_HasScreens; + int m_Type = keystroke; + QStringList m_TypeScreenNames = QStringList(); + QString m_SwitchScreenName = QString(); + int m_SwitchDirection = switchLeft; + int m_LockCursorMode = lockCursorToggle; + bool m_ActiveOnRelease = false; + bool m_HasScreens = false; bool m_restartServer; static const char *m_ActionTypeNames[];