Skip to content

Prepare for KUnitConversion::Unit to become non-virtual in KF6

Volker Krause requested to merge work/de-virtualize-unit into master

Any "real" inheritance would be subject to slicing given Unit instances are treated as a value type everywhere. As inheritance right now is only used to bypass access control, use helper methods in UnitPrivate for that and actually make it a real value type in KF6.

This also marks all dptr access for de-inlining in KF6, which clears the way for potentially further optimizing this, as the majority of dptr instances are entirely static data but are currently all dynamically allocated.

A change along these lines is probably desirable for UnitCategory as well.

Merge request reports