D7270: [FileUndoManager] Enable undoing changes in read-only folders
Chinmoy Ranjan Pradhan
noreply at phabricator.kde.org
Wed Aug 16 18:29:21 UTC 2017
chinmoyr added a comment.
> Is this subclass needed? You could just move the code of its constructor to the UndoJob constructor, no? (using Q_D of course)
I tried this before anything else and it didn't worked. Q_D requires a private class, right?
> It seems to me that we only want to undo with "privilege execution enabled" if the original job has privilege execution enabled, no?
> This requires storing that information together with the undo information...
If original job has the flag set and privilege operation succeeds, undo will be available and if the flag is not set then no operation will take place and undo won't be available.
So I don't think storing any other info is required.
> (if I understand correctly, the flag in kio jobs is mostly so that jobs triggered programmatically rather than via user interaction never prompt with polkit; but only jobs from the user get undo support, and only jobs where polkit was used would need polkit during undo ... unless I'm missing something).
actually its flag+setParentJob combo that controls triggering of any kind of prompt.
> So I'm a bit undecided, but I welcome any thoughts in this reflection ;)
I added the variable so that it can be toggled through a dolphin setting. My initial plan was to add a checkbox/toggle to dolphin's setting to "Enable/Disable undo in read-only folder" and read it in FileUndoManager. That time I assumed some users might want to disable undo inside a read-only folder. Personally I want Undo to be there all the time. Do you think there is any need to add such setting? Otherwise that variable can be removed and some of the issues you pointed will be solved as well.
REVISION DETAIL
https://phabricator.kde.org/D7270
To: chinmoyr, #frameworks, dfaure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170816/12bff4cd/attachment.html>
More information about the Kde-frameworks-devel
mailing list