From 7b4316ea8fb8350fb531b421297cba3ffda1ba30 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Wed, 19 Jul 2017 21:11:19 +0300 Subject: [PATCH] Fix main menu item location on macOS --- src/gui/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 0fc0a314d..3acce3c27 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -326,6 +326,13 @@ MainWindow::MainWindow(QWidget *parent) m_ui->actionCheckForUpdates->setVisible(false); #endif + // Certain menu items should reside at specific places on macOS. + // Qt partially does it on its own, but updates and different languages require tuning. + m_ui->actionExit->setMenuRole(QAction::QuitRole); + m_ui->actionAbout->setMenuRole(QAction::AboutRole); + m_ui->actionCheckForUpdates->setMenuRole(QAction::ApplicationSpecificRole); + m_ui->actionOptions->setMenuRole(QAction::PreferencesRole); + connect(m_ui->actionManageCookies, &QAction::triggered, this, &MainWindow::manageCookies); m_pwr = new PowerManagement(this);