10QAndroidPlatformMenuBar::QAndroidPlatformMenuBar()
13 QtAndroidMenu::addMenuBar(
this);
24 m_menus.insert(std::find(m_menus.begin(),
26 static_cast<QAndroidPlatformMenu *>(before)),
27 static_cast<QAndroidPlatformMenu *>(menu));
28 m_menuHash.insert(m_nextMenuId++, menu);
34 m_menus.erase(std::find(m_menus.begin(),
36 static_cast<QAndroidPlatformMenu *>(menu)));
39 QHash<
int, QPlatformMenu *>::iterator it = m_menuHash.begin();
40 while (it != m_menuHash.end()) {
41 if (it.value() == menu) {
42 it = m_menuHash.erase(it);
44 maxId = qMax(maxId, it.key());
49 m_nextMenuId = maxId + 1;
54 QHash<
int, QPlatformMenu *>::const_iterator it;
55 for (it = m_menuHash.constBegin(); it != m_menuHash.constEnd(); ++it) {
56 if (it.value() == menu)
70 if (m_parentWindow == newParentWindow)
72 m_parentWindow = newParentWindow;
78 for (QAndroidPlatformMenu *menu : m_menus) {
79 if (menu->tag() == tag)
88 return m_menuHash.value(menuId);
93 return m_parentWindow;
103 return &m_menusListMutex;
void removeMenuBar(QAndroidPlatformMenuBar *menuBar)
void syncMenu(QAndroidPlatformMenu *)
void setMenuBar(QAndroidPlatformMenuBar *menuBar, QWindow *window)