D29107: [KJotsEdit] Reimplement ancient (yet still relevant) workaround for QTextEdit

Igor Poboiko noreply at phabricator.kde.org
Wed Apr 22 18:56:07 BST 2020


poboiko created this revision.
poboiko added reviewers: dvratil, dfaure.
Herald added a project: KDE PIM.
poboiko requested review of this revision.

REVISION SUMMARY
  If the very first block of the document has some style, the cursor is not aware of it.
  However, explicitly telling to move the cursor to the start of the document makes the cursor catch up the style
  (it's probably slighly better than moving cursor to the left / to the right).
  
  The best I could find was this stackoveflow, unfortunately:
  https://stackoverflow.com/questions/37160039/set-default-character-format-in-qtextdocument

TEST PLAN
  1. Make a document starting with a, say, bold word
  2. Close && Reopen KJots (so that it doesn't reload already used cursor)
  3. Reopen this document -> the cursor is shown as bold from the very beginning

REPOSITORY
  R573 KJots

BRANCH
  workaround (branched from master)

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

AFFECTED FILES
  src/kjotsedit.cpp
  src/kjotsedit.h
  src/kjotswidget.cpp

To: poboiko, dvratil, dfaure
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200422/6fb86353/attachment.html>


More information about the kde-pim mailing list