Drop units singleton being exported from the Kirigami desktop theme plugin
Open, Needs TriagePublic

Description

Plugins shouldn't leak API, it means we write unportable code.

Kirigami.Units is fine.

/technically/ it's not an API break to remove as it's not "API" , practically it will be a problem to do before branching as incorrect code will break on Plasma.

dfaure added a subscriber: dfaure.Feb 16 2020, 9:25 PM

I'm confused. The units singleton shouldn't be exported but Kirigami.Units is fine? What's the difference?

units is the id of the Object in the org.kde.desktop style (and in the default units file). But that is not true for all styles: In kirigamiplasmadesktopstyle it's unitsRoot and in kirigamiplasmastyle it doesn't have an id. The proper way to acess Units is through Kirigami.Units. If you are using plasma.core it also clashes with units. (I hope that's correct)

bshah added a subscriber: bshah.Feb 17 2020, 11:33 AM

Is there something left to do here?

There's still Units.qml file in org/kde/breeze/impl, but other than that I think we got rid of everything else?