Set menu roles in ui file.
This commit is contained in:
parent
a5c7a9b9c6
commit
e7461eb9a2
@ -222,6 +222,7 @@ MainWindow::MainWindow(
|
||||
|
||||
// Initialise the UI
|
||||
ui_->setupUi(this);
|
||||
|
||||
ui_->multi_loading_indicator->SetTaskManager(task_manager_);
|
||||
ui_->now_playing->SetCoverProviders(cover_providers_);
|
||||
ui_->now_playing->SetLibraryBackend(library_->backend());
|
||||
@ -599,15 +600,6 @@ MainWindow::MainWindow(
|
||||
connect(check_updates, SIGNAL(triggered(bool)), SLOT(CheckForUpdates()));
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_DARWIN
|
||||
// Force this menu to be the app "Preferences".
|
||||
ui_->action_configure->setMenuRole(QAction::PreferencesRole);
|
||||
// Force this menu to be the app "About".
|
||||
ui_->action_about->setMenuRole(QAction::AboutRole);
|
||||
// Force this menu to be the app "Quit".
|
||||
ui_->action_quit->setMenuRole(QAction::QuitRole);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qLog(Debug) << "Creating sparkle updater";
|
||||
qtsparkle::Updater* updater = new qtsparkle::Updater(
|
||||
|
@ -418,7 +418,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1131</width>
|
||||
<height>23</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_music">
|
||||
@ -541,6 +541,9 @@
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Q</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::QuitRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_stop_after_this_track">
|
||||
<property name="text">
|
||||
@ -624,6 +627,9 @@
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+P</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::PreferencesRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_about">
|
||||
<property name="text">
|
||||
@ -632,6 +638,9 @@
|
||||
<property name="shortcut">
|
||||
<string>F1</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::AboutRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_shuffle">
|
||||
<property name="text">
|
||||
@ -795,6 +804,9 @@
|
||||
<property name="text">
|
||||
<string>About Qt...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::AboutQtRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_mute">
|
||||
<property name="checkable">
|
||||
|
Loading…
x
Reference in New Issue
Block a user