Fix tooltip woes
ClosedPublic

Authored by hein on Jun 19 2018, 11:07 AM.

Details

Summary

Users have reported a number of bugs against TM tooltips, e.g. initially
coming up with crazy sizes, or showing window duplicates. This all comes
down to a race conditions causing stale data and ugly code that's using
visible props to swap between two alternate UI implementations instead
of doing clean conditional loading.

With this cleanup patch the problems should be gone, as well as various
ReferenceErrors spewed onto the tty.

BUG:382571
BUG:385947
BUG:389469
BUG:388749

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hein created this revision.Jun 19 2018, 11:07 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 19 2018, 11:07 AM
hein requested review of this revision.Jun 19 2018, 11:07 AM

race condition

a race between what?

hein added a comment.Jun 19 2018, 11:11 AM

race condition

a race between what?

To be honest, I didn't fully figure it out. But when the assignment in Tasks.qml was an integer to the delegate, it meant that the DelegateModel in the delegate sometimes started out with an undefined rootIndex and therefore bad data - almost as if the binding never got evaluated. Always assigning a freshly-made model index directly in the mouse event handler fixed it, and I prefer it style-wise anyway.

davidedmundson accepted this revision.Jun 19 2018, 11:19 AM
This revision is now accepted and ready to land.Jun 19 2018, 11:19 AM
This revision was automatically updated to reflect the committed changes.
hein reopened this revision.Jun 20 2018, 7:30 PM
This revision is now accepted and ready to land.Jun 20 2018, 7:30 PM
hein updated this revision to Diff 36405.Jun 20 2018, 7:30 PM

Fix crash on Qt <5.11

This makes no sense, but fixes the crash reliably in testing. Since it
works on 5.11, this may be a bug that got fixed in Qt. I didn't bisect
it though.

hein requested review of this revision.Fri, Jun 22, 7:03 PM
rikmills added a subscriber: rikmills.EditedFri, Jun 22, 7:58 PM

I have tested the modified patch on the same environment with Qt 5.10.1 where I found the crash with the previous version in 5.13.1 tars.

plasmashell now seems to start without issue on login

davidedmundson accepted this revision.Fri, Jun 22, 9:01 PM
This revision is now accepted and ready to land.Fri, Jun 22, 9:01 PM
This revision was automatically updated to reflect the committed changes.