Ensure app exiting flag is set on logoff/shutdown

* Fix #3944
This commit is contained in:
Jonathan White 2021-01-26 23:05:22 -05:00
parent 35d215aa70
commit db18a14cde

View file

@ -555,6 +555,9 @@ MainWindow::MainWindow()
MessageWidget::Error);
}
// Properly shutdown on logoff, restart, and shutdown
connect(qApp, &QGuiApplication::commitDataRequest, this, [this] { m_appExitCalled = true; });
#if defined(KEEPASSXC_BUILD_TYPE_SNAPSHOT) || defined(KEEPASSXC_BUILD_TYPE_PRE_RELEASE)
auto* hidePreRelWarn = new QAction(tr("Don't show again for this version"), m_ui->globalMessageWidget);
m_ui->globalMessageWidget->addAction(hidePreRelWarn);