D13171: Add support for form text formatting

Albert Astals Cid noreply at phabricator.kde.org
Mon May 28 14:43:51 UTC 2018


aacid added a comment.


  I'm not very happy of the internalText method/storage in form, ideally, the text in core/form should always be the internal text, and if there's a formatted text that needs to be different that should only be as part of the widget itself. i.e. the FormLineEdit would do something like
  
  setText( formatText( form->text() ) );
  
  Do you think it could be implemented this way?

INLINE COMMENTS

> document.cpp:4297
> +        {
> +            for ( const FormField *form: p->formFields() )
> +            {

You can simplify the loop to p->formFields().contains(fft);

> document.cpp:4341
> +    {
> +        // When the field was calculated we need to refresh even
> +        // if the format script changed nothing. e.g. on error.

I don't understand this, can you elaborate why we need to update a form if the new and old text are the same?

REPOSITORY
  R223 Okular

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

To: aheinecke, aacid
Cc: okular-devel, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180528/9725f1f1/attachment-0001.html>


More information about the Okular-devel mailing list