fix(kcm): use explicit Kirigami.Units over singleton from a theme
ClosedPublic

Authored by davidedmundson on Feb 16 2020, 6:54 PM.

Details

Summary

units lowercase is defined by

PlasmaCore as a singleton (which we generally shouldn't be using)
Kirigami's desktop theme plugin, as a singleton. This plugin is only
loaded on KDE

Kirigami.Units is the correct import that is always defined.

BUG: 417316

Test Plan

opened KCM normally and with forced QT_QPA_PLATFORM

Diff Detail

Repository
R104 KScreen
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Feb 16 2020, 6:54 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 16 2020, 6:54 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Feb 16 2020, 6:54 PM
apol accepted this revision.Feb 16 2020, 7:00 PM
This revision is now accepted and ready to land.Feb 16 2020, 7:00 PM

More generally, should we be porting towards Kirigami.Units everywhere?

I think the commit message got bit messed up David, pls fix before commiting :)

More generally, should we be porting towards Kirigami.Units everywhere?

I think plasmoids should still use plasma units?

More generally, should we be porting towards Kirigami.Units everywhere?

"everywhere" is complex.

If it was using the API from kirigami's theme plugin, it should be ported.
If it was resolving against the one from PlasmaCore, that's fine.

romangg accepted this revision.Feb 17 2020, 12:33 AM
romangg retitled this revision from fix(kcm): Use explicit Kirigami.Units over singleton from a theme to fix(kcm): use explicit Kirigami.Units over singleton from a theme.
This revision was automatically updated to reflect the committed changes.