Merge pull request #1335 from keepassxreboot/hotfix/prevent-menu-moves

Prevent shadowing of application settings on MacOS
This commit is contained in:
Weslly 2017-12-28 21:20:18 -02:00 committed by GitHub
commit ad8fca259f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -193,7 +193,6 @@ MainWindow::MainWindow()
m_ui->actionChangeMasterKey->setIcon(filePath()->icon("actions", "database-change-key", false)); m_ui->actionChangeMasterKey->setIcon(filePath()->icon("actions", "database-change-key", false));
m_ui->actionLockDatabases->setIcon(filePath()->icon("actions", "document-encrypt", false)); m_ui->actionLockDatabases->setIcon(filePath()->icon("actions", "document-encrypt", false));
m_ui->actionQuit->setIcon(filePath()->icon("actions", "application-exit")); m_ui->actionQuit->setIcon(filePath()->icon("actions", "application-exit"));
m_ui->actionQuit->setMenuRole(QAction::QuitRole);
m_ui->actionEntryNew->setIcon(filePath()->icon("actions", "entry-new", false)); m_ui->actionEntryNew->setIcon(filePath()->icon("actions", "entry-new", false));
m_ui->actionEntryClone->setIcon(filePath()->icon("actions", "entry-clone", false)); m_ui->actionEntryClone->setIcon(filePath()->icon("actions", "entry-clone", false));
@ -210,11 +209,9 @@ MainWindow::MainWindow()
m_ui->actionGroupEmptyRecycleBin->setIcon(filePath()->icon("actions", "group-empty-trash", false)); m_ui->actionGroupEmptyRecycleBin->setIcon(filePath()->icon("actions", "group-empty-trash", false));
m_ui->actionSettings->setIcon(filePath()->icon("actions", "configure")); m_ui->actionSettings->setIcon(filePath()->icon("actions", "configure"));
m_ui->actionSettings->setMenuRole(QAction::PreferencesRole);
m_ui->actionPasswordGenerator->setIcon(filePath()->icon("actions", "password-generator", false)); m_ui->actionPasswordGenerator->setIcon(filePath()->icon("actions", "password-generator", false));
m_ui->actionAbout->setIcon(filePath()->icon("actions", "help-about")); m_ui->actionAbout->setIcon(filePath()->icon("actions", "help-about"));
m_ui->actionAbout->setMenuRole(QAction::AboutRole);
m_actionMultiplexer.connect(SIGNAL(currentModeChanged(DatabaseWidget::Mode)), m_actionMultiplexer.connect(SIGNAL(currentModeChanged(DatabaseWidget::Mode)),
this, SLOT(setMenuActionState(DatabaseWidget::Mode))); this, SLOT(setMenuActionState(DatabaseWidget::Mode)));

View File

@ -297,11 +297,17 @@
<property name="text"> <property name="text">
<string>&amp;Quit</string> <string>&amp;Quit</string>
</property> </property>
<property name="menuRole">
<enum>QAction::QuitRole</enum>
</property>
</action> </action>
<action name="actionAbout"> <action name="actionAbout">
<property name="text"> <property name="text">
<string>&amp;About</string> <string>&amp;About</string>
</property> </property>
<property name="menuRole">
<enum>QAction::AboutRole</enum>
</property>
</action> </action>
<action name="actionDatabaseOpen"> <action name="actionDatabaseOpen">
<property name="text"> <property name="text">
@ -408,6 +414,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Database settings</string> <string>Database settings</string>
</property> </property>
<property name="menuRole">
<enum>QAction::NoRole</enum>
</property>
</action> </action>
<action name="actionEntryClone"> <action name="actionEntryClone">
<property name="enabled"> <property name="enabled">
@ -451,6 +460,9 @@
<property name="text"> <property name="text">
<string>&amp;Settings</string> <string>&amp;Settings</string>
</property> </property>
<property name="menuRole">
<enum>QAction::PreferencesRole</enum>
</property>
</action> </action>
<action name="actionPasswordGenerator"> <action name="actionPasswordGenerator">
<property name="checkable"> <property name="checkable">