← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~mzanetti/reminders-app/fix-stale-qt-tags into lp:reminders-app

 

The proposal to merge lp:~mzanetti/reminders-app/fix-stale-qt-tags into lp:reminders-app has been updated.

Description changed to:

I caught a data loss bug that happened with a note of mine. Afaiu, this can happen if you create a note with reminders and just add some empty lines (paragraphs). The QTextEdit will set a style attribute to it like:

<p style="-qt-paragraph-type: empty"> </p>

If this is sent to Evernote and the user edits this paragraph on the website, it will add content to the paragraph but still keep that attribute, not knowing about it but still trying to play nice on other clients and keep their special attributes.

When this comes back to reminders, QTextEdit will get confused about the paragraph being marked as an empty one but still having text, effectively, not displaying half of the content in this paragraph. Saving such a note will permanently drop parts of the paragraph and sync the result back to Evernote.

As a fix, I now completely clean up all the "-qt-*" tags generated by the QTextArea when converting the content back to ENML. That might make rendering next time a wee little slower, as the QTextEdit seems to regenerate those tags, but gives me a much better feeling than having stale attributes floating around - and fixes the content loss with my test note here.

For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/fix-stale-qt-tags/+merge/255894
-- 
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/fix-stale-qt-tags into lp:reminders-app.


References