Skip to content
Permalink
Browse files

Fix macOS Preferences menu hijacking

  • Loading branch information
dakcarto committed Dec 28, 2016
1 parent 12a4a9c commit 94dd1f445696edee42a0dae2fd559fb47576f56f
Showing with 8 additions and 2 deletions.
  1. +2 −0 python/plugins/processing/ProcessingPlugin.py
  2. +5 −1 src/app/qgisapp.cpp
  3. +1 −1 src/ui/qgisapp.ui
@@ -96,6 +96,8 @@ def initGui(self):
QIcon(os.path.join(cmd_folder, 'images', 'config.png')),
self.tr('&Options...'), self.iface.mainWindow())
self.configAction.setObjectName('configAction')
self.configAction.setMenuRole(QAction.NoRole)

self.configAction.triggered.connect(self.openConfig)
self.iface.registerMainWindowAction(self.configAction, 'Ctrl+Alt+C')
self.menu.addAction(self.configAction)
@@ -2028,7 +2028,11 @@ void QgisApp::createMenus()
// keep plugins from hijacking About and Preferences application menus
// these duplicate actions will be moved to application menus by Qt
mProjectMenu->addAction( mActionAbout );
mProjectMenu->addAction( mActionOptions );
QAction* actionPrefs = new QAction( tr( "Preferences..." ), this );
actionPrefs->setMenuRole( QAction::PreferencesRole );
actionPrefs->setIcon( mActionOptions->icon() );
connect( actionPrefs, SIGNAL( triggered() ), this, SLOT( options() ) );

This comment has been minimized.

Copy link
@nyalldawson

nyalldawson Dec 28, 2016

Collaborator

cough new style connects cough ;)

This comment has been minimized.

Copy link
@dakcarto

dakcarto Dec 28, 2016

Author Member

Should be fixed in 95ff9a1. Thanks!

mProjectMenu->addAction( actionPrefs );

// Window Menu

@@ -1583,7 +1583,7 @@
<string>&amp;Options...</string>
</property>
<property name="menuRole">
<enum>QAction::PreferencesRole</enum>
<enum>QAction::NoRole</enum>
</property>
</action>
<action name="mActionCustomProjection">

0 comments on commit 94dd1f4

Please sign in to comment.
You can’t perform that action at this time.