Skip to content

KateLayoutCache overhaul

Waqar Ahmed requested to merge work/layoutcache-ptr into master

This MR is a set of commits that attempt to improve and cleanup KateLayoutCache* code. The changes are as follows:

  • Use unique_ptr for storing the line layouts. Using unique_ptr makes it much easier to understand and reason about code. It is more efficient as well.
  • Introduce a KateLineLayout::invalid() that is returned instead of returning null to the users of layout cache. Similarly, return KateTextLayout invalid if the lineLayout is null. This might avoid some hard to debug / understand crashes
  • Remove some dead code and not needed functions

The changes are in individual commits.

Merge request reports

Loading