[KUrlNavigatorPlacesSelector] Properly identify teardown action
ClosedPublic

Authored by broulik on Jan 21 2019, 9:48 AM.

Details

Summary

Rather than relying on the model count (which broke when we added places categories), just identify the action by the data it is given.

BUG: 403454

Test Plan
  • Hid Places panel in Dolphin and navigated around some mounts: Only one Unmount entry that came and went as it should
  • Unmount still works
  • Opened a place directly, "Unmount" action was at the correct place and worked

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jan 21 2019, 9:48 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 21 2019, 9:48 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Jan 21 2019, 9:48 AM
broulik planned changes to this revision.Jan 21 2019, 11:56 AM

There seems to be one issue that when you open a mounted drive directly, you get an "Unmount" entry at the top.
Likely because the places are populated after the entry was created.
Perhaps the remove codepath needs to iterate all actions and check rather than assuming it's always the last place.

broulik updated this revision to Diff 64791.Aug 28 2019, 7:27 AM
broulik edited the test plan for this revision. (Show Details)
  • Iterate all actions
  • Set the id on the separator as well so we can identify it easily
broulik updated this revision to Diff 64792.Aug 28 2019, 7:27 AM
  • Remove pointless isEmpty check
dfaure accepted this revision.Sep 16 2019, 11:30 AM
This revision is now accepted and ready to land.Sep 16 2019, 11:30 AM
This revision was automatically updated to reflect the committed changes.