aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickmenubar_p_p.h
diff options
context:
space:
mode:
authorWang Chuan <ouchuanm@outlook.com>2019-10-08 17:50:25 +0800
committerWang Chuan <ouchuanm@outlook.com>2019-10-24 16:00:56 +0800
commit66de71b26a6c3b5be308c1a92287b6490164ae72 (patch)
treeac6121eb826904815d4ec71b17b1cb8be151bb2a /src/quicktemplates2/qquickmenubar_p_p.h
parent78569ded1a6b9b660416bfc1208efecdfb1bdd51 (diff)
QQuickMenuBar: let MenuBarItem lose highlight when Menu is dismissed
When adding new MenuBarItem to MenuBar, MenuBar will first check the Menu pointer in MenuBarItem and then connect the Menu's signal [aboutToHide] to MenuBar's slot [onMenuAboutToHide] to unhighlight the MenuBarItem. In case of adding dynamic Menu, this operation will be performed before setting new Menu to MenuBarItem. So the Menu pointer in MenuBarItem is null, and the connection will not be performed. [ChangeLog][Controls][QQuickMenuBar] Fixed issue with dynamically menu bar items not losing their highlight when their menu was dismissed. Fixes: QTBUG-77306 Change-Id: Ibe987462505f65747b4290b3c206e9dfbcbbef57 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickmenubar_p_p.h')
-rw-r--r--src/quicktemplates2/qquickmenubar_p_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickmenubar_p_p.h b/src/quicktemplates2/qquickmenubar_p_p.h
index 75fbed73e9..c214962b5c 100644
--- a/src/quicktemplates2/qquickmenubar_p_p.h
+++ b/src/quicktemplates2/qquickmenubar_p_p.h
@@ -69,7 +69,7 @@ public:
QQmlListProperty<QQuickMenu> menus();
QQmlListProperty<QObject> contentData();
- QQuickItem *beginCreateItem();
+ QQuickItem *beginCreateItem(QQuickMenu *menu);
void completeCreateItem();
QQuickItem *createItem(QQuickMenu *menu);