summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosmenu.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-03-31 13:04:46 +0200
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-04-04 08:46:42 +0000
commitce4a759c3dae25b56ec21f98e876b1830c99fa22 (patch)
tree4c64658f076c61c8016d844690c376d921aef703 /src/plugins/platforms/ios/qiosmenu.h
parentf40cf77b0fa1cd5353ca866a7a5799da9f303081 (diff)
iOS: enable changing menu items in QIOSMenu while it's showing
If the menu items change while a menu is showing, the current implementation would crash. The current code tried to take this scenario into account by using a copy of the item list inside the native menus, but failed since the list contained pointers to menu items. And those items would be deleted in a higher layer when removed from the owning QMenu, even if the native menu was visible. One could argue that the list of items should not change while the menu is visible, but from testing, other platforms handle this scenario gracefully. So this patch will ensure we do the same on iOS. Task-number: QTBUG-44275 Change-Id: I5508e1d6d47039a9aa948c246b33479bd6801868 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosmenu.h')
-rw-r--r--src/plugins/platforms/ios/qiosmenu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosmenu.h b/src/plugins/platforms/ios/qiosmenu.h
index f65a90fb40..15f200bb27 100644
--- a/src/plugins/platforms/ios/qiosmenu.h
+++ b/src/plugins/platforms/ios/qiosmenu.h
@@ -88,7 +88,7 @@ public:
void insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) Q_DECL_OVERRIDE;
void removeMenuItem(QPlatformMenuItem *menuItem) Q_DECL_OVERRIDE;
- void syncMenuItem(QPlatformMenuItem *) Q_DECL_OVERRIDE {}
+ void syncMenuItem(QPlatformMenuItem *) Q_DECL_OVERRIDE;
void syncSeparatorsCollapsible(bool) Q_DECL_OVERRIDE {}
void setTag(quintptr tag) Q_DECL_OVERRIDE;