Skip to content

KQuickStyleItem: Minor optimizations

ivan tkachenko requested to merge work/ratijas/minor-optimizations into master

Replace indirect updateItem() with direct polish() calls

The updateItem method is just a wrapper for polish() exposed to runtime meta-system by being a public slot. There is no need for it in regular C++.

Use QStringView for more efficient string processing

Hopefully someday QStringView would also support in-place slice() modifier, and built-in toLower() without temporary QString allocation.

Factor out padding calculation logic

Downgrade initStyleOption to non-virtual

The class is private, and there are no subclasses, so this method should use static dispatching for speed.

Merge request reports