toolbarlayout: Buffer calls to calculateImplicitSize()
`calculateImplicitSize()` is called by ToolBarLayoutDelegate to update the implicit size after the delegate knows what its actual size is. However, since it needs the delegates to determine the size, it will call `createDelegates()` to update the list of delegates. This works fine if the delegate is properly async, unfortunately in some cases Qt will force the delegate creation into sync mode as there is no async incubation controller. This then creates an infinite recursion as ToolBarLayout does not yet know that the delegate exists and tries to create a new one. To avoid that, we can change implicit size calculation to be a part of the layout process, only recalculating it when actually needed. Any explicit calls to recalculate the implicit size will instead invalidate the implicit size and call `polish()`. This makes relayouting calls avoid the loop while ensuring layouting has the most up to date information about delegate sizes. BUG: 471286
parent
7692b64d
Please register or sign in to comment