Fix QDBusPlatformMenu::menuItemAt()
Other platform menu implementations check that the index is not out of bounds, so make QDBusPlatformMenu::menuItemAt() do the same. Change-Id: I1d2e42681f2dbfff8b80044141d620bddbc3b6aa Task-number: QTBUG-51372 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>bb10
parent
e695b92464
commit
45feee5f93
|
|
@ -262,7 +262,7 @@ void QDBusPlatformMenu::setContainingMenuItem(QDBusPlatformMenuItem *item)
|
|||
|
||||
QPlatformMenuItem *QDBusPlatformMenu::menuItemAt(int position) const
|
||||
{
|
||||
return m_items.at(position);
|
||||
return m_items.value(position);
|
||||
}
|
||||
|
||||
QPlatformMenuItem *QDBusPlatformMenu::menuItemForTag(quintptr tag) const
|
||||
|
|
|
|||
Loading…
Reference in New Issue