Commit 2bb6f30f authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed missing shortcuts in menus

parent aa6b7e97
...@@ -165,7 +165,7 @@ QAction* addMenuItem(QObject* parent, QMenu* menu, const char* text, ...@@ -165,7 +165,7 @@ QAction* addMenuItem(QObject* parent, QMenu* menu, const char* text,
{ {
QAction* action QAction* action
= new QAction(get_icon(iconName), translate_utf8(text), parent); = new QAction(get_icon(iconName), translate_utf8(text), parent);
if (!strcmp(shortcut, "")) { if (strcmp(shortcut, "")) {
action->setShortcut(fl(shortcut)); action->setShortcut(fl(shortcut));
} }
QObject::connect(action, SIGNAL(triggered()), parent, callback); QObject::connect(action, SIGNAL(triggered()), parent, callback);
...@@ -180,7 +180,7 @@ QAction* addMenuItemMapped(QObject* parent, QMenu* menu, const char* text, ...@@ -180,7 +180,7 @@ QAction* addMenuItemMapped(QObject* parent, QMenu* menu, const char* text,
{ {
QAction* action QAction* action
= new QAction(get_icon(iconName), translate_utf8(text), parent); = new QAction(get_icon(iconName), translate_utf8(text), parent);
if (!strcmp(shortcut, "")) { if (strcmp(shortcut, "")) {
action->setShortcut(fl(shortcut)); action->setShortcut(fl(shortcut));
} }
QObject::connect(action, signal, parent, callback); QObject::connect(action, signal, parent, callback);
...@@ -194,7 +194,7 @@ QAction* addCheckableMenuItem(QObject* parent, QMenu* menu, const char* text, ...@@ -194,7 +194,7 @@ QAction* addCheckableMenuItem(QObject* parent, QMenu* menu, const char* text,
{ {
QAction* action QAction* action
= new QAction(get_icon(iconName), translate_utf8(text), parent); = new QAction(get_icon(iconName), translate_utf8(text), parent);
if (!strcmp(shortcut, "")) { if (strcmp(shortcut, "")) {
action->setShortcut(fl(shortcut)); action->setShortcut(fl(shortcut));
} }
action->setCheckable(true); action->setCheckable(true);
...@@ -208,7 +208,7 @@ QAction* addMenuRadioItem(QObject* parent, QMenu* menu, const char* text, ...@@ -208,7 +208,7 @@ QAction* addMenuRadioItem(QObject* parent, QMenu* menu, const char* text,
const char* callback, QActionGroup* group, const char* shortcut) const char* callback, QActionGroup* group, const char* shortcut)
{ {
QAction* action = new QAction(translate_utf8(text), parent); QAction* action = new QAction(translate_utf8(text), parent);
if (!strcmp(shortcut, "")) { if (strcmp(shortcut, "")) {
action->setShortcut(fl(shortcut)); action->setShortcut(fl(shortcut));
} }
QObject::connect(action, SIGNAL(triggered()), parent, callback); QObject::connect(action, SIGNAL(triggered()), parent, callback);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment