suggested minor cleanup

This commit is contained in:
digant73 2024-12-05 17:49:52 +01:00
parent 089e273c3b
commit 15f3208e89

View file

@ -161,20 +161,16 @@ bool gui_application::Init()
{
welcome_dialog* welcome = new welcome_dialog(m_gui_settings, false);
bool use_dark_theme = false;
connect(welcome, &QDialog::finished, this, [&]()
{
use_dark_theme = welcome->use_dark_theme();
if (welcome->use_dark_theme())
{
m_gui_settings->SetValue(gui::m_currentStylesheet, gui::DarkStylesheet);
}
});
// welcome dialog is auto-flagged (in its constructor) as WA_DeleteOnClose, so its pointer is no more usable after welcome->exec()
welcome->exec();
if (use_dark_theme)
{
m_gui_settings->SetValue(gui::m_currentStylesheet, gui::DarkStylesheet);
}
}
// Check maxfiles