mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
Make impossible to disable fatal errors
This commit is contained in:
parent
aa5dc5455e
commit
d98f739043
1 changed files with 6 additions and 10 deletions
|
@ -150,10 +150,6 @@ void log_frame::SetLogLevel(logs::level lev)
|
||||||
switch (lev)
|
switch (lev)
|
||||||
{
|
{
|
||||||
case logs::level::always:
|
case logs::level::always:
|
||||||
{
|
|
||||||
nothingAct->trigger();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case logs::level::fatal:
|
case logs::level::fatal:
|
||||||
{
|
{
|
||||||
fatalAct->trigger();
|
fatalAct->trigger();
|
||||||
|
@ -209,12 +205,11 @@ void log_frame::CreateAndConnectActions()
|
||||||
act->setCheckable(true);
|
act->setCheckable(true);
|
||||||
|
|
||||||
// This sets the log level properly when the action is triggered.
|
// This sets the log level properly when the action is triggered.
|
||||||
auto l_callback = [this, logLevel]() {
|
connect(act, &QAction::triggered, [this, logLevel]()
|
||||||
s_gui_listener.enabled = logLevel;
|
{
|
||||||
|
s_gui_listener.enabled = std::max(logLevel, logs::level::fatal);
|
||||||
xgui_settings->SetValue(GUI::l_level, static_cast<uint>(logLevel));
|
xgui_settings->SetValue(GUI::l_level, static_cast<uint>(logLevel));
|
||||||
};
|
});
|
||||||
|
|
||||||
connect(act, &QAction::triggered, l_callback);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
clearAct = new QAction(tr("Clear"), this);
|
clearAct = new QAction(tr("Clear"), this);
|
||||||
|
@ -223,6 +218,7 @@ void log_frame::CreateAndConnectActions()
|
||||||
// Action groups make these actions mutually exclusive.
|
// Action groups make these actions mutually exclusive.
|
||||||
logLevels = new QActionGroup(this);
|
logLevels = new QActionGroup(this);
|
||||||
nothingAct = new QAction(tr("Nothing"), logLevels);
|
nothingAct = new QAction(tr("Nothing"), logLevels);
|
||||||
|
nothingAct->setVisible(false);
|
||||||
fatalAct = new QAction(tr("Fatal"), logLevels);
|
fatalAct = new QAction(tr("Fatal"), logLevels);
|
||||||
errorAct = new QAction(tr("Error"), logLevels);
|
errorAct = new QAction(tr("Error"), logLevels);
|
||||||
todoAct = new QAction(tr("Todo"), logLevels);
|
todoAct = new QAction(tr("Todo"), logLevels);
|
||||||
|
@ -244,7 +240,7 @@ void log_frame::CreateAndConnectActions()
|
||||||
xgui_settings->SetValue(GUI::l_tty, checked);
|
xgui_settings->SetValue(GUI::l_tty, checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
l_initAct(nothingAct, logs::level::always);
|
l_initAct(nothingAct, logs::level::fatal);
|
||||||
l_initAct(fatalAct, logs::level::fatal);
|
l_initAct(fatalAct, logs::level::fatal);
|
||||||
l_initAct(errorAct, logs::level::error);
|
l_initAct(errorAct, logs::level::error);
|
||||||
l_initAct(todoAct, logs::level::todo);
|
l_initAct(todoAct, logs::level::todo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue