Bug 437118 - kcm_landingpage doesn't disable feedback control if built without kuserfeedback
Summary: kcm_landingpage doesn't disable feedback control if built without kuserfeedback
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: VHI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-14 20:24 UTC by Fabian Vogt
Modified: 2021-05-19 08:53 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2021-05-14 20:24:59 UTC
When starting systemsettings, these errors appear:

file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:33:5: Unable to assign [undefined] to bool
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:67:17: Unable to assign [undefined] to bool
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:65:17: Unable to assign [undefined] to KCoreConfigSkeleton*
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:78: TypeError: Cannot read property 'feedbackLevel' of undefined
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:58: TypeError: Cannot read property 'feedbackLevel' of undefined
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:33:5: Unable to assign [undefined] to bool
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:58: TypeError: Cannot read property 'feedbackLevel' of undefined
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:67:17: Unable to assign [undefined] to bool
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:65:17: Unable to assign [undefined] to KCoreConfigSkeleton*
file:///usr/share/kpackage/kcms/kcm_landingpage/contents/ui/FeedbackControls.qml:78: TypeError: Cannot read property 'feedbackLevel' of undefined

Due to this, the controls remain enabled, but don't do anything.
It should probably treat it as if kcm.feedbackEnabled was false instead or not install FeedbackControls.qml at all.
Comment 1 Marco Martin 2021-05-18 12:02:44 UTC
A weird thing is that since as FeedbackControls.qml does import 
 org.kde.userfeedback 1.0 
which in theory should make the loader fail, instead there FeedbackControls seems to correcly load, so the userfeedback framework seems installed, or at least a part of it.
I'll add one more condition in the loader to make sure the file isn't loaded at all.
Comment 2 Bug Janitor Service 2021-05-18 13:38:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/484
Comment 3 Fabian Vogt 2021-05-18 15:38:03 UTC
(In reply to Marco Martin from comment #1)
> A weird thing is that since as FeedbackControls.qml does import 
>  org.kde.userfeedback 1.0 
> which in theory should make the loader fail, instead there FeedbackControls
> seems to correcly load, so the userfeedback framework seems installed, or at
> least a part of it.

Yep, it's just disabled at build time.

> I'll add one more condition in the loader to make sure the file isn't loaded
> at all.
Comment 4 Marco Martin 2021-05-19 08:53:48 UTC
Git commit bcc7219b2def5a607466bdea966b49e754ffdb40 by Marco Martin.
Committed on 19/05/2021 at 08:53.
Pushed by mart into branch 'master'.

don't attempt to load FeebackControls if disabled

If user feedback is disabled at build time feedbackEnabled property
won't be present at all, so use that to inhibit completely the Loader
for Feedbackcontrols.qml

M  +1    -0    kcms/landingpage/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/bcc7219b2def5a607466bdea966b49e754ffdb40