diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-08-09 11:10:40 +0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-08-15 01:21:37 +0000 |
commit | f27d1ccbb24ec2fd4098f2976503478831006cc8 (patch) | |
tree | d9eb9dbc784529ba46f91a7d51cb94805cdfc347 /src/widgets/kernel/qwidget.h | |
parent | c161c6db780b308a604875c3e0f7affb09e89fce (diff) |
QCocoaMenu: De-pessimize the number of calls to validateMenuItem:
Calling -[NSMenu update] every time we add a new item can result in
a quadratic behavior since the function itself will iterate over all
the items in the menu. We solve this by using a 0-timer which will
trigger the call to update the next time the event loop spins.
Menurama manual test updated.
Change-Id: Ic155d364515cc93eb81b1c8085c8e44c93799954
Task-number: QTBUG-62396
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.h')
0 files changed, 0 insertions, 0 deletions