Use the destination KFileItem object to figure out of it's writable instead of creating a KFileItemListProperties which basically does the same thing but more expensive.
ClosedPublic

Authored by markg on Feb 3 2018, 10:51 PM.

Details

Summary

Use KFileItem::isWritable instead of the detour with KFileItemListProperties.
It's basically the same, only more expensive.
KFileItem::isWritable is already quite expensive on it's own.
This saves cycles but to be fair, the amount is neglectable.

Test Plan

I verified that the paste action in Dolphin (under the Right mouse button) still works.
Is active (when writable) and shows the correct text as before.

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.
markg created this revision.Feb 3 2018, 10:51 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 3 2018, 10:51 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
markg requested review of this revision.Feb 3 2018, 10:51 PM
ngraham accepted this revision.Feb 3 2018, 11:25 PM
This revision is now accepted and ready to land.Feb 3 2018, 11:25 PM
This revision was automatically updated to reflect the committed changes.