diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-06-21 13:37:40 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-06-21 15:12:57 +0200 |
commit | 5b5e8f78fecbe2bd9279bfa9ef10015cef8b1bc7 (patch) | |
tree | 915d1bf6efcdf38305d3ee8f0fefb2e2afdc0167 /src/widgets/styles | |
parent | a7cbb8c639487edbabc08ea99498503b33c9f6d6 (diff) |
NSMenuItem/NSMenu - set the submenu properly
... in case the submenu is set from a slot, attached to the aboutToShow()
signal. Normally, with a 'statically' pre-populated menu, we set 'submenu'
property on a menu item from 'updateItem' callback in our menu delegate.
After that, AppKit calls our delegate's willOpen call back and this is
where we emit 'aboutToShow'. Unfortunately, if an application tries to
create a nested menu 'dynamically' at this point, it never becomes 'submenu'
of the item, since 'updateItem' was already handled at this point.
We catch this case in QCocoaMenuItem and call setAttachedItem if needed.
Fixes: QTBUG-76060
Change-Id: I676bf1d8529b9ddbfc90e4dff422b39668b7a5fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/styles')
0 files changed, 0 insertions, 0 deletions