diff options
author | Jonathan White <support@dmapps.us> | 2021-01-27 07:05:22 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2021-01-27 18:27:23 +0300 |
commit | db18a14cde40dc24a5f2f2a10cb5b874ca2c8174 (patch) | |
tree | ccb0754234f29ded13d3c9084edbee34722f45e6 | |
parent | 35d215aa708425aab61b6fcc0001c006c6a5d4fb (diff) |
Ensure app exiting flag is set on logoff/shutdown
* Fix #3944
-rw-r--r-- | src/gui/MainWindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index c4bee6b67..c7df04a69 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -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); |