Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2021-01-27 07:05:22 +0300
committerJonathan White <support@dmapps.us>2021-01-27 18:27:23 +0300
commitdb18a14cde40dc24a5f2f2a10cb5b874ca2c8174 (patch)
treeccb0754234f29ded13d3c9084edbee34722f45e6
parent35d215aa708425aab61b6fcc0001c006c6a5d4fb (diff)
Ensure app exiting flag is set on logoff/shutdown
* Fix #3944
-rw-r--r--src/gui/MainWindow.cpp3
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);