aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols
diff options
context:
space:
mode:
authorVolker Hilsheimer <[email protected]>2024-03-01 13:00:52 +0100
committerVolker Hilsheimer <[email protected]>2024-03-14 23:18:57 +0200
commitd5cd8ac31577f4feecb0934f30f58af25261b5b1 (patch)
tree560b75a4fb8b97146e2e0568e4825a8c1a24551e /src/quickcontrols
parent9c54252914634a6756b39261b027b48b96c6ea7b (diff)
Clean up and refactor hover event delivery
Replace bool-trap with a dedicated enum to indicate whether hover should get set or cleared. Use structured bindings to decompose the std::pair we get from the flat-map, and assert that the id has the right value (0 when clearing, non-0 when setting) after delivering the hover event. Remove the call to clear() on the flat-map of hoverItems in clearHover; at this point, all items in the map must have an ID of 0, and will be removed from the map in the next run of deliverHoverEvent. This way, the hoverItems list is no longer modified while we iterate over the list of hoverItems, and we can remove the copy of the flatmap introduced as a low-impact fix in d00e890e5dbcc559bd63ae996e2b31485e3b03bf. Change-Id: Ic5fa7cb63ab4ee62f6465e6c126e9109ef28f7e2 Reviewed-by: Shawn Rutledge <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'src/quickcontrols')
0 files changed, 0 insertions, 0 deletions