D10932: [Okular] Option to reset forms

Albert Astals Cid noreply at phabricator.kde.org
Tue Apr 17 23:10:16 UTC 2018


aacid added a comment.


  Sorry for the late answer.
  
  I've been thinking about this and as all the stuff random user ask for, it shows they have not really thought much about it, and it is probably my fault having set this as a junio job.
  
  What does "Reset" actually mean? Is clearing a field resetting it? What if the field had "BLA" as contents when you opened it? Wouldn't resetting mean going back to "BLA" instead of empty?
  
  Ok, so this could be solved by changing from "Reset Forms" to "Clear Forms".
  
  "Clear" has a more "make this empty" meaning.
  
  But how do you actually clear a Radio button? When one of the N buttons has to be selected by definition?
  
  One could say "ok, let's ignore radio buttons".
  
  But then the biggest problem shows up and is on change actions linked to forms. You can have javascript linked to changing contents on form fields, and for example you could have one that said "if text of field A is empty put text 'BLA' on field B".
  
  What would be the correct output of running "Clear Forms"? Should field B contain "BLA" or not?
  
  And i'm going to say probably, but how do you actually achieve that programatically? I don't see a way since you'll go "set field A to be empty" -> "this triggers its execute change action" -> "set field B to empty"
  
  So my current thinking is closing the feature request as won't fix giving a version of the explanation written above.
  
  What do you think? Do you think what i say makes sense or am i saying stupid things?
  
  And if we were to throw away this code, how sad would you be? Have you at least learnt a bit about how testing/undo commands in Qt work?

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama, #okular, aacid
Cc: cfeck, ngraham, aacid, #okular, michaelweghorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180417/4ced8e0d/attachment.html>


More information about the Okular-devel mailing list