Do not ignore MainWindow closeEvent when closing to tray

Ignoring closeEvent signals that the application doesn't want the widget
to be closed. This may cause unwanted shutdown interruption. There's no
difference between close() and hide() unless WA_DeleteOnClose is set, so
it's better to just accept the event if we're hiding the window
afterwards anyway.

Resolves #856
This commit is contained in:
Valeriy Malov 2018-03-13 22:28:19 +03:00 committed by TheZ3ro
parent 4a207f079b
commit 0650b3084e

View File

@ -797,7 +797,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
config()->get("GUI/MinimizeOnClose").toBool();
if (minimizeOnClose && !m_appExitCalled)
{
event->ignore();
event->accept();
hideWindow();
if (config()->get("security/lockdatabaseminimize").toBool()) {