[DolphinContextMenu] Use the view's already existing root KFileItem
ClosedPublic

Authored by broulik on Sep 4 2018, 12:42 PM.

Details

Summary

Saves creating a new KFileItem from scratch which stats the file.
Only when the root item isn't available (as can happen when you're currently looking at an non-existing directory) will it create a new KFileItem

Test Plan

Context menu still works fine
Haven't actually encountered a case where m_baseUrl was different from the root url

Diff Detail

Repository
R318 Dolphin
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.Sep 4 2018, 12:42 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 4 2018, 12:42 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Sep 4 2018, 12:42 PM
ngraham accepted this revision.Sep 5 2018, 3:46 AM
ngraham added a subscriber: ngraham.

Makes sense to me and seems to work fine.

This revision is now accepted and ready to land.Sep 5 2018, 3:46 AM
This revision was automatically updated to reflect the committed changes.