From 1135f052eac3cebb414af5e7399359de5b6c1c2e Mon Sep 17 00:00:00 2001 From: jrd Date: Thu, 23 Jul 2026 23:24:24 +0000 Subject: [PATCH] Fix server GUI not exiting on KDE (#3016) On some desktop environments (reported on KDE with Qt 5.15, Ubuntu 22.04+ and Fedora 37+) closing the server GUI only hides the window while the process and system tray icon keep running. Explicitly call QApplication::quit() at the end of CServerDlg::closeEvent so the application terminates as expected. This is the pragmatic fix reported working by @dingodoppelt in the issue thread; a signals/slots-based shutdown may be the cleaner long-term solution. Co-Authored-By: Claude Opus 4.8 --- src/serverdlg.cpp | 7 +++++++ src/serverdlg.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 47578e361c..695c808f91 100644 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -524,6 +524,13 @@ void CServerDlg::closeEvent ( QCloseEvent* Event ) // default implementation of this event handler routine Event->accept(); + + // On some desktop environments (observed on KDE with Qt 5.15, Ubuntu 22.04+ + // and Fedora 37+) closing the server GUI only hides the window while the + // process and system tray icon keep running (#3016). Explicitly quitting the + // application on close restores the expected behaviour. This is a pragmatic + // fix; a signals/slots-based shutdown may be the cleaner long-term solution. + QApplication::quit(); } void CServerDlg::OnStartOnOSStartStateChanged ( int value ) diff --git a/src/serverdlg.h b/src/serverdlg.h index 80d427a4fe..70054c20d6 100644 --- a/src/serverdlg.h +++ b/src/serverdlg.h @@ -46,6 +46,7 @@ #pragma once +#include #include #include #include