summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-09-23 15:47:47 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-09-30 17:45:00 +0200
commit83669a5a58d42e9ed09a3c5c39145b8a833fd87a (patch)
treed27fd20b51235611024f65e760c392d36150a411
parente1ba563285270fd20e0aa8b9692b1bf1686b0128 (diff)
downloadqtquickcontrols-83669a5a58d42e9ed09a3c5c39145b8a833fd87a.tar.gz
Allow sharing menu items
This is needed for mobile platforms that want to present the whole menubar as a single button. For example, if the menubar has only one menu, it will be shown directly. If there are multiple menus, they will be placed into a proxy menu (the removed assertion would fail). Change-Id: I83365253b89f6b450812f032af0e9fe3e4f847ff Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
-rw-r--r--src/controls/qquickmenu.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/controls/qquickmenu.cpp b/src/controls/qquickmenu.cpp
index 69328349..0b31b78b 100644
--- a/src/controls/qquickmenu.cpp
+++ b/src/controls/qquickmenu.cpp
@@ -675,8 +675,6 @@ void QQuickMenu::setupMenuItem(QQuickMenuBase *item, int platformIndex)
void QQuickMenu::append_menuItems(QQuickMenuItems *list, QObject *o)
{
if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(list->object)) {
- Q_ASSERT(o->parent() == menu);
-
if (QQuickMenuBase *menuItem = qobject_cast<QQuickMenuBase *>(o)) {
menu->m_menuItems.append(menuItem);
menu->setupMenuItem(menuItem);