[vlc-commits] commit: Qt: provide QAction roles for menu roles (Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Fri Dec 10 15:41:11 CET 2010
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Dec 10 15:40:51 2010 +0100| [387d1ce62402645fab01b05226c5674800fa48cf] | committer: Jean-Baptiste Kempf
Qt: provide QAction roles for menu roles
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=387d1ce62402645fab01b05226c5674800fa48cf
---
modules/gui/qt4/menus.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index d064ab9..4d48e7d 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -93,7 +93,9 @@ void addDPStaticEntry( QMenu *menu,
const QString& text,
const char *icon,
const char *member,
- const char *shortcut = NULL )
+ const char *shortcut = NULL,
+ QAction::MenuRole = QAction::NoRole
+ )
{
QAction *action = NULL;
#ifndef __APPLE__ /* We don't set icons in menus in MacOS X */
@@ -398,7 +400,7 @@ QMenu *QVLCMenu::ToolsMenu( QMenu *menu )
menu->addSeparator();
addDPStaticEntry( menu, qtr( "&Preferences" ),
- ":/menu/preferences", SLOT( prefsDialog() ), "Ctrl+P" );
+ ":/menu/preferences", SLOT( prefsDialog() ), "Ctrl+P", QAction::PreferencesRole );
return menu;
}
@@ -762,7 +764,7 @@ QMenu *QVLCMenu::HelpMenu( QWidget *parent )
#endif
menu->addSeparator();
addDPStaticEntry( menu, qtr( I_MENU_ABOUT ), ":/menu/info",
- SLOT( aboutDialog() ), "Shift+F1" );
+ SLOT( aboutDialog() ), "Shift+F1", QAction::AboutRole );
return menu;
}
@@ -901,7 +903,7 @@ void QVLCMenu::PopupMenuStaticEntries( QMenu *menu )
#endif
addDPStaticEntry( menu, qtr( "Quit" ), ":/menu/quit",
- SLOT( quit() ), "Ctrl+Q" );
+ SLOT( quit() ), "Ctrl+Q", QAction::QuitRole );
}
/* Video Tracks and Subtitles tracks */
More information about the vlc-commits
mailing list