aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_key_server_sync
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-12-26 23:21:36 +0100
committersaturneric <[email protected]>2025-12-26 23:21:36 +0100
commit63da8ad9789138ac774abac2e49381c8dddc5cb4 (patch)
tree36cdf9d54139330537d2ccb677867e6253bdbd07 /src/m_key_server_sync
parentfeat(utils): add missing `GFSDKUIModel` and `gpgme.h` includes (diff)
downloadmodules-63da8ad9789138ac774abac2e49381c8dddc5cb4.tar.gz
modules-63da8ad9789138ac774abac2e49381c8dddc5cb4.zip
fix(ui): set parent for `QAction` in menu
* Assigns the parent widget to the QAction to ensure proper ownership and resource management by Qt * Prevents potential memory leaks and improves UI stability
Diffstat (limited to 'src/m_key_server_sync')
-rw-r--r--src/m_key_server_sync/KeyServerSyncModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/m_key_server_sync/KeyServerSyncModule.cpp b/src/m_key_server_sync/KeyServerSyncModule.cpp
index 31b9a6a..c5b7918 100644
--- a/src/m_key_server_sync/KeyServerSyncModule.cpp
+++ b/src/m_key_server_sync/KeyServerSyncModule.cpp
@@ -206,7 +206,7 @@ REGISTER_EVENT_HANDLER(MAINWINDOW_MENU_MOUNTED, [](const MEvent& event) -> int {
QWidget* parent =
qobject_cast<QWidget*>(static_cast<QObject*>(main_window));
auto* action = new QAction(
- QCoreApplication::translate("GTrC", "Key Server"), nullptr);
+ QCoreApplication::translate("GTrC", "Key Server"), parent);
action->setToolTip(QCoreApplication::translate(
"GTrC", "Import public keys from a trusted key server."));
action->setIcon(QIcon(":/icons/import_key_from_server.png"));