aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2023-09-12 11:15:41 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-09-12 14:36:16 -0300
commitbae209e3879fa099302d3b211362c49bbbfbdd14 (patch)
treea1f7c85c64ee1797e19ab590cd26810b63224f5c /src/qt
parente14cc8fc69cb3e3a98076fbb23a94eba7873368a (diff)
gui: macOS, make appMenuBar part of the main app window
By moving the appMenuBar destruction responsibility to the QT framework, we ensure the disconnection of the submenus signals prior to the destruction of the main app window. The standalone menu bar may have served a purpose in earlier versions when it didn't contain actions that directly open specific screens within the main application window. However, at present, all the actions within the appMenuBar lead to the opening of screens within the main app window. So, the absence of a main app window makes these actions essentially pointless.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 73e09630de..3375573677 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -239,7 +239,6 @@ BitcoinGUI::~BitcoinGUI()
trayIcon->hide();
#ifdef Q_OS_MACOS
delete m_app_nap_inhibitor;
- delete appMenuBar;
MacDockIconHandler::cleanup();
#endif
@@ -470,13 +469,7 @@ void BitcoinGUI::createActions()
void BitcoinGUI::createMenuBar()
{
-#ifdef Q_OS_MACOS
- // Create a decoupled menu bar on Mac which stays even if the window is closed
- appMenuBar = new QMenuBar();
-#else
- // Get the main window's menu bar on other platforms
appMenuBar = menuBar();
-#endif
// Configure the menus
QMenu *file = appMenuBar->addMenu(tr("&File"));