[KRichTextWidget] Remove ancient workaround and fix regression (commit 1d1eb6f)

Authored by poboiko on Apr 18 2020, 9:15 PM.

Description

[KRichTextWidget] Remove ancient workaround and fix regression (commit 1d1eb6f)

Summary:
This patch removes the workaround, which (according to comment) comes from Qt4
times. Although I wasn't even able to find the original bug (only the title,
"Remove implicit margin on bullet lists when exporting to HTML"), it would seem
like the workaround is no longer actual (i.e. margins are consistent).

This is an alternative approach to D28819: [KRichTextEdit] Always treat key press as single modification in undo stack, as it removes the code which
actually cluttered the undo stack. The latter patch introduced couple
regressions unfortunately
(e.g. ability to "undo" a written word, not just the last letter)

However, it slightly changes the behavior: it removes margins around a bullet
list, which are probably not needed anyways (e.g. LibreOffice doesn't have it)

Test Plan:

  1. Create a bullet list in krichtexteditor with couple of lines
  2. Try to undo -> a single undo is sufficient
  3. Press enter to add bunch of empty new lines, so that scroll appears
  4. Scroll still follows the cursor

Reviewers: Frameworks, dfaure, ahmadsamir

Reviewed By: dfaure

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D28964

Details