Bug 423786 - Port from units.[spacing value] to PlasmaCore.Units.[spacing value] everywhere
Summary: Port from units.[spacing value] to PlasmaCore.Units.[spacing value] everywhere
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.19.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-02 07:46 UTC by BingMyBong
Modified: 2021-02-03 22:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21
Sentry Crash Report:


Attachments
Journal output (33.00 KB, text/plain)
2020-07-02 07:46 UTC, BingMyBong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BingMyBong 2020-07-02 07:46:39 UTC
Created attachment 129841 [details]
Journal output

SUMMARY
Journal filling up with SDDM-greeter errors related to Breeze that shouldn't be there

STEPS TO REPRODUCE
1. Login
2. Logout
3. 

OBSERVED RESULT
Small section from journal (via journalctl)

Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/Main.qml:463: TypeError: Cannot read property 'smallSpacing' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/lib64/qt5/qml/org/kde/plasma/workspace/components/BatteryIcon.qml:42: TypeError: Cannot call method 'roundToIconSize' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/components/Battery.qml:27: TypeError: Cannot read property 'smallSpacing' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/Main.qml:441: TypeError: Cannot read property 'largeSpacing' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/Main.qml:446: TypeError: Cannot read property 'gridUnit' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/Main.qml:157: TypeError: Cannot read property 'gridUnit' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/components/ActionButton.qml:102: TypeError: Cannot read property 'smallSpacing' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/components/ActionButton.qml:39: TypeError: Cannot read property 'gridUnit' of null
Jul 01 09:55:11 LanL sddm-greeter[12108]: file:///usr/share/sddm/themes/breeze-openSUSE/components/ActionButton.qml:55: TypeError: Cannot read property 'smallSpacing' of null

EXPECTED RESULT
No errors in journal

I've attached a bigger list of journal errors that includes the example above. I do have a lot more errors in this small file than there should be.

SOFTWARE/OS VERSIONS
opensuse:tumbleweed:20200622
Qt: 5.15.0 KDE Frameworks: 5.71.0 - KDE Plasma:  5.19.1 - kwin 5.19.1
kmail2 5.14.2 (20.04.2) - akonadiserver 5.14.2 (20.04.2) - Kernel:  5.7.2-1-default  - xf86-video-nouveau:  1.0.16
Comment 1 Fabian Vogt 2020-07-02 07:57:01 UTC
Those errors happen when sddm-greeter shuts down. It's just that the
Kirigami.Units Singleton is destructed before its users, so it turns into null.
This is harmless and you can just ignore this. It happens with git master too.

I guess that it should just use "Units.foo" instead of "units.foo" to refer to the
Singleton explicitly instead of via its id and also import org.kde.kirigami.
At least that seems to avoid the issue here.
Comment 2 Nate Graham 2020-07-02 20:20:43 UTC
No need to import Kirigami since there's a Plasma version, which would be PlasmaCore.Units.gridUnit, right?
Comment 3 Fabian Vogt 2020-07-02 20:35:46 UTC
(In reply to Nate Graham from comment #2)
> No need to import Kirigami since there's a Plasma version, which would be
> PlasmaCore.Units.gridUnit, right?

Looks like it, yep. Currently it uses kirigami units, can that cause different behaviour?
Comment 4 Nate Graham 2020-07-02 23:33:53 UTC
They should be the same visually, but it's more semantically correct to use PlasmaCore Units in Plasma shell UIs, and Kirigami Units in Desktop/app UIs.
Comment 5 Nate Graham 2020-07-27 19:56:04 UTC
Work started with https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/42
Comment 6 Nate Graham 2021-02-03 22:45:18 UTC
This has been done for Plasma 5.21 now.