Set menu roles manually where possible

Qt tries to determine the role of a menu item based on its text. If the
text is "Preferences" it guesses that that menu item opens the
preferences dialog. On MacOS X this means the menu item is moved from
the View menu to the application menu. However, for translations this
doesn't seem to work, so this commit sets the menu roles manually. At
least that's the idea - no idea if it works.

See issue #200.
This commit is contained in:
Martin Kleusberg
2015-02-11 18:53:21 +01:00
parent 027ba81d99
commit 848b16f03e

View File

@@ -310,8 +310,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>311</width>
<height>531</height>
<width>294</width>
<height>444</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
@@ -796,7 +796,7 @@
<x>0</x>
<y>0</y>
<width>1000</width>
<height>25</height>
<height>19</height>
</rect>
</property>
<widget class="QMenu" name="fileMenu">
@@ -1252,6 +1252,9 @@
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
<property name="menuRole">
<enum>QAction::QuitRole</enum>
</property>
</action>
<action name="fileImportSQLAction">
<property name="text">
@@ -1374,6 +1377,9 @@
<property name="whatsThis">
<string>Open the preferences window.</string>
</property>
<property name="menuRole">
<enum>QAction::PreferencesRole</enum>
</property>
</action>
<action name="viewDBToolbarAction">
<property name="checkable">
@@ -1402,6 +1408,9 @@
<property name="text">
<string>&amp;About...</string>
</property>
<property name="menuRole">
<enum>QAction::AboutRole</enum>
</property>
</action>
<action name="actionRecent_y_opened">
<property name="text">