[Fstab] Use folder-decrypted icon for encrypting fuse mounts
ClosedPublic

Authored by bruns on May 5 2019, 10:05 PM.

Details

Summary

When Vaults are mounted and show up in the mtab, use the matching icon.
As these mounts are only visible in the decrypted state, use the
folder-decrypted icon.

Test Plan

Vault shows up with matching icon

Diff Detail

Repository
R245 Solid
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.May 5 2019, 10:05 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 5 2019, 10:05 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.May 5 2019, 10:05 PM
broulik added a subscriber: broulik.May 6 2019, 7:06 AM

Looks like we need a symbolic icon for that in breeze

bruns added a comment.May 6 2019, 1:20 PM

Looks like we need a symbolic icon for that in breeze

VDG ^

Preferably yes, though thats orthogonal to this change.

ngraham accepted this revision.May 6 2019, 3:27 PM
This revision is now accepted and ready to land.May 6 2019, 3:27 PM
hallas added inline comments.May 6 2019, 5:14 PM
src/solid/devices/backends/fstab/fstabdevice.cpp
62

Would it make sense to wrap this in a function with a more expressive name like: isEncryptedFilesystem or isValutFilesystem? Then we could use the same function in fstabhandling.cpp:126

91

I think a switch here (without a default case) would be nice. This would allow us to get the compiler to tell us to update this list if new storage types are added.

172

Why do we create a new FstabNetworkShare everytime this function is called with NetworkShare but we return the same object instance when it is a StorageAccess?

bruns marked 2 inline comments as done.May 6 2019, 6:04 PM
bruns added inline comments.
src/solid/devices/backends/fstab/fstabdevice.cpp
62

I don't think there is much to gain here - as the function is trivial, we should inline it. To keep the code easy to understand, the function name has to be really expressive. On the next fuse filesystem added, it may become quite different.

172

The storageAccess is also used internally, for the emblems() method. Creating it on each call would be to expensive, especially as it has quite some signals connected, also DBus signals.
NetworkShare is quite lightweight. There is no reason it couldn't be cached, but hardly any benefit.

This revision was automatically updated to reflect the committed changes.
bruns marked 2 inline comments as done.