-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[systemsettings] Ability to rename SD card and partitions. JB#54905 #3
base: master
Are you sure you want to change the base?
Conversation
@Tomin1 could you check |
Ping @Tomin1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments. I didn't try this yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some error handling things and I started wondering about one UI design related thing, see the comments below.
-fixed |
src/partition.h
Outdated
@@ -73,7 +73,8 @@ class SYSTEMSETTINGS_EXPORT Partition | |||
Unlocking, | |||
Unlocked, | |||
Locking, | |||
Locked | |||
Locked, | |||
Renamed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? The mounted/unmounted type of statuses make sense and so do transient mounting/unmounting etc, but this sort of of "end states" feel funny. The "Formatted" is an existing thing, but are they really different from "Unmounted" other than that the partition tracking has seen or initiated some related operation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Removed Renamed status
Generally looks fine for me now. One thing missing from the API, though, is any kind of indication there is this task ongoing or when it succeeds. The Renamed status did the latter part but for the mentioned reasons it wasn't good either. a transient "Renaming" type of status could be ok. But how much that matters depends on the UI. Perhaps could be done separately too. |
Done. Add "Renaming" status |
watcher->deleteLater(); | ||
}); | ||
|
||
emit status(devicePath, Partition::Renaming); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now the only new status change on the last update. Per se good, but what's now removing the Renaming state when the operation is done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see. What status should be set when operation is done? "Renamed"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd expect Unmounted if the operation can be done only to unmounted partitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/udisks2monitor.cpp
Outdated
connect(watcher, &QDBusPendingCallWatcher::finished, | ||
this, [this, devicePath, dbusMethod](QDBusPendingCallWatcher *watcher) { | ||
if (watcher->isValid() && watcher->isFinished()) { | ||
emit status(devicePath, Partition::Unmounted); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On error this stays forever on Renaming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For small polish could move the status changes after the 'if', on both branches it's the last thing done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
One minor comment but besides that looks at least good to me. Could still test once the UI gets some polish. |
Tried running this with the current UI side PR and renaming a vfat partition. Didn't succeed. For the errors the journal didn't include much, just: The UI didn't complain about anything. With dbus-monitor on the system bus noticed: Would be included in dosfstools, but that's gplv3 and compiled into tools side only https://github.com/mer-tools/dosfstools Instead we have busybox-symlinks-dosfstools which doesn't seem to include such a thing. |
It requires dosfstools to be installed. It doesn't work with busybox-symlinks-dosfstools. |
No description provided.