mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
refactor: remove warnings globals
This commit is contained in:
parent
9c4b0b7ce4
commit
260f8da71a
27 changed files with 87 additions and 51 deletions
|
|
@ -72,25 +72,25 @@ void KernelNotifications::progress(const bilingual_str& title, int progress_perc
|
|||
|
||||
void KernelNotifications::warningSet(kernel::Warning id, const bilingual_str& message)
|
||||
{
|
||||
if (node::g_warnings.Set(id, message)) {
|
||||
if (m_warnings.Set(id, message)) {
|
||||
AlertNotify(message.original);
|
||||
}
|
||||
}
|
||||
|
||||
void KernelNotifications::warningUnset(kernel::Warning id)
|
||||
{
|
||||
g_warnings.Unset(id);
|
||||
m_warnings.Unset(id);
|
||||
}
|
||||
|
||||
void KernelNotifications::flushError(const bilingual_str& message)
|
||||
{
|
||||
AbortNode(&m_shutdown, m_exit_status, message);
|
||||
AbortNode(&m_shutdown, m_exit_status, message, &m_warnings);
|
||||
}
|
||||
|
||||
void KernelNotifications::fatalError(const bilingual_str& message)
|
||||
{
|
||||
node::AbortNode(m_shutdown_on_fatal_error ? &m_shutdown : nullptr,
|
||||
m_exit_status, message);
|
||||
m_exit_status, message, &m_warnings);
|
||||
}
|
||||
|
||||
void ReadNotificationArgs(const ArgsManager& args, KernelNotifications& notifications)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue