Bug 477718 - Buttons do not update when ConfigModule.buttons property is changed,
Summary: Buttons do not update when ConfigModule.buttons property is changed,
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: 5.27.9
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-29 14:26 UTC by Anton Golubev
Modified: 2023-11-29 21:15 UTC (History)
1 user (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 Anton Golubev 2023-11-29 14:26:02 UTC
I'm creating a KCM module, and would like to sometimes hide the "Defaults" button. Main KCM class inherits from ConfigModule, which has a public property "buttons". But when changing this property, visually nothing happens, like the signal does not reach ModuleView::updateButtons. And there doesn't seem to be a good way to manually update this.

But, for example, changing the needsSave property leads to updating the buttons and some button may “unexpectedly” disappear or appear.

This is how I use it - I invert needsSave twice to update the buttons, but this, of course, is wrong.

Here I posted a minimal example to reproduce (see main.qml):
https://gitlab.com/golubevan/kcm-minimal/-/tree/update-buttons

SOFTWARE/OS VERSIONS

Linux 6.5.12 (X11)
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Comment 1 Nate Graham 2023-11-29 21:15:32 UTC
Hello! You've reached the KDE bug tracker, which is for tracking bugs in KDE software. Unfortunately here on the bug tracker, we cannot offer help with software development topics not clearly related to specific bugs in KDE software, and thus far there is no evidence that this is a bug, as opposed to not using the APIs in quite the right way. You can find appropriate ways to get in contact with the dev team for assistance with your issue at https://community.kde.org/Get_Involved/development#Communicate_with_the_dev_team. If they determine that it is truly a bug, feel free to re-open this bug report.

Thanks!