These fstab options allow an administrator to specify names and icons intended for the user, shown in a GUI.
For details, see https://git.gnome.org/browse/gvfs/tree/monitor/udisks2/what-is-shown.txt
Based on a patch originally done by Stefan Brüns
These fstab options allow an administrator to specify names and icons intended for the user, shown in a GUI.
For details, see https://git.gnome.org/browse/gvfs/tree/monitor/udisks2/what-is-shown.txt
Based on a patch originally done by Stefan Brüns
This is a frameworks port and cleanup of https://git.reviewboard.kde.org/r/113587
Placed the following in /etc/fstab
hostname:/ /mnt/ nfs4 defaults,_netdev,user,rw,exec,comment=x-gvfs-show,x-gvfs-name=Test%20Folder,x-gvfs-icon=folder-home,timeo=14,noatime 0 0
Got the following entry:
Lint Skipped |
Unit Tests Skipped |
Just some minor comments, besides that, looks sane.
src/solid/devices/backends/fstab/fstabdevice.cpp | ||
---|---|---|
40–41 ↗ | (On Diff #12435) | Did you intentionally switch vendor and product? |
51 ↗ | (On Diff #12435) | QStringRef through midRef() |
54 ↗ | (On Diff #12435) | likewise, use QStringRef |
src/solid/devices/backends/fstab/fstabhandling.cpp | ||
146 ↗ | (On Diff #12435) | If you save the decodedName, you could also call splitRef() to avoid more allocations. |
src/solid/devices/backends/fstab/fstabdevice.cpp | ||
---|---|---|
40–41 ↗ | (On Diff #12435) | I wondered that too, that's in the original patch, though, didn't really look into where this will end up, though :D |
src/solid/devices/backends/fstab/fstabdevice.cpp | ||
---|---|---|
40–41 ↗ | (On Diff #12435) | Just checked, this way round it makes more sense. The vendor will be the host name and product the path. However, I'll split that into a separate patch then. |
The patch looks good to me (without testing this locally here). I think the one QStringRef can be turned by to QStringList, since you finally need the QString anyways it seems...
src/solid/devices/backends/fstab/fstabhandling.cpp | ||
---|---|---|
152 ↗ | (On Diff #12435) | Well ok, given you need to convert the string to QString finally anyways, you can keep the QStringList above (line 148). |
src/solid/devices/backends/fstab/fstabstorageaccess.cpp | ||
---|---|---|
48 ↗ | (On Diff #12435) | Another useless use of const QList<T>&, FstabHandling returns a detached list. |
52 ↗ | (On Diff #12435) | According to the linked udisk2 documentation, this should be a plain "x-gvfs-hide", scrap the "comment=". |