Qt/hotkeys: do not show the debugging tab if the debugger is disabled

This commit is contained in:
aldelaro5
2018-05-13 18:12:31 -04:00
parent 2c861e75f5
commit 0a2357f044
3 changed files with 41 additions and 24 deletions

View File

@ -215,29 +215,7 @@ void HotkeyScheduler::Run()
if (SConfig::GetInstance().bEnableDebugging)
{
if (IsHotkey(HK_STEP))
emit Step();
if (IsHotkey(HK_STEP_OVER))
emit StepOver();
if (IsHotkey(HK_STEP_OUT))
emit StepOut();
if (IsHotkey(HK_SKIP))
emit Skip();
if (IsHotkey(HK_SHOW_PC))
emit ShowPC();
if (IsHotkey(HK_SET_PC))
emit Skip();
if (IsHotkey(HK_BP_TOGGLE))
emit ToggleBreakpoint();
if (IsHotkey(HK_BP_ADD))
emit AddBreakpoint();
CheckDebuggingHotkeys();
}
// TODO: HK_MBP_ADD
@ -471,3 +449,30 @@ void HotkeyScheduler::Run()
State::UndoSaveState();
}
}
void HotkeyScheduler::CheckDebuggingHotkeys()
{
if (IsHotkey(HK_STEP))
emit Step();
if (IsHotkey(HK_STEP_OVER))
emit StepOver();
if (IsHotkey(HK_STEP_OUT))
emit StepOut();
if (IsHotkey(HK_SKIP))
emit Skip();
if (IsHotkey(HK_SHOW_PC))
emit ShowPC();
if (IsHotkey(HK_SET_PC))
emit Skip();
if (IsHotkey(HK_BP_TOGGLE))
emit ToggleBreakpoint();
if (IsHotkey(HK_BP_ADD))
emit AddBreakpoint();
}