Skip to content

Fix crash when flicking mouse over rating star

Jack Hill requested to merge jackh/elisa:fix-ratingstar-crash into master

Reason for the change

Previously the app would crash when flicking the mouse over a rating star.

It was something to do with setting the star icon's layer.enabled when entering/leaving the hover area. Not sure what the root cause was, maybe setting it a lot of times in a short period of time.

Now we just use one mouse area for the control and calculate the hovered rating from the location of the mouse with respect to the width of the control.

I can't reproduce the crash in the 23.08 distro package, so I guess this is probably an issue in Qt that needs to be fixed. Still I prefer this refactoring since it uses a little bit less imperative code.

Test plan

  • Open a grid/list view
  • Open the search toolbar
  • Flick mouse back & forth over the rating stars
  • Previously: crash
  • Now: no crash
Edited by Jack Hill

Merge request reports