iOS: store shortcut sequence in menu item

Change-Id: I4c99516fb98ce0da84b8690cc4c1fd71c0db9dca
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Richard Moe Gustavsen 2015-08-28 11:41:57 +02:00
parent af5b62844c
commit 163158bf4f
2 changed files with 7 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public:
void setRole(MenuRole role) Q_DECL_OVERRIDE;
void setCheckable(bool) Q_DECL_OVERRIDE {}
void setChecked(bool) Q_DECL_OVERRIDE {}
void setShortcut(const QKeySequence&) Q_DECL_OVERRIDE {}
void setShortcut(const QKeySequence&) Q_DECL_OVERRIDE;
void setEnabled(bool enabled) Q_DECL_OVERRIDE;
void setIconSize(int) Q_DECL_OVERRIDE {}
@ -73,6 +73,7 @@ public:
bool m_enabled;
bool m_separator;
QIOSMenu *m_menu;
QKeySequence m_shortcut;
private:
QString removeMnemonics(const QString &original);

View File

@ -277,6 +277,11 @@ void QIOSMenuItem::setRole(QPlatformMenuItem::MenuRole role)
m_role = role;
}
void QIOSMenuItem::setShortcut(const QKeySequence &sequence)
{
m_shortcut = sequence;
}
void QIOSMenuItem::setEnabled(bool enabled)
{
m_enabled = enabled;