Bug 454579

Summary: Location config page is always shown regardless of pluginName
Product: [Plasma] plasmashell Reporter: ratijas <me>
Component: ContainmentAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: kde, nate, notmart
Priority: LO    
Version First Reported In: 5.26.90   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Plasma config - unloaded Location

Description ratijas 2022-05-29 15:58:59 UTC
Created attachment 149319 [details]
Plasma config - unloaded Location

SUMMARY

Location config page is always shown regardless of pluginName (which can be either "org.kde.plasma.folder" or "org.kde.desktopcontainment"). In case of "org.kde.desktopcontainment", it is not visible in a sidebar, but loaded by default as a page. Changed on the page, however, seem to have no effect on the applet instance, at least in Plasmoid Viewer.

There config is defined as follow:

```qml
ConfigModel {
    property bool isFolder: (plasmoid.pluginName === "org.kde.plasma.folder")

    ConfigCategory {
         name: i18n("Location")
         icon: "folder"
         source: "ConfigLocation.qml"
         visible: isFolder
    }
//...
```

So it seems like `visible` binding being set too late, when the page is already loaded, and changing it to false does not unload the page.

STEPS TO REPRODUCE
1. Run `plasmoidviewer -a org.kde.desktopcontainment`
2. Open applet configuration

OBSERVED RESULT
Location page is loaded and shown, but it is not present in the list.

EXPECTED RESULT
Consistently not showing a configuration page which is not supposed to be visible.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Kernel Version: 5.18.0-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2