Bug 498473

Summary: Provide a mechanism to return the keys in a group via the KWrite- and KReadConfig binaries.
Product: [Frameworks and Libraries] frameworks-kconfig Reporter: Roke Julian Lockhart Beedell <4wy78uwh>
Component: generalAssignee: Matthew Dawson <matthew>
Status: CONFIRMED ---    
Severity: wishlist CC: bnerickson87, easbarba, kdelibs-bugs-null, nate, peter
Priority: NOR    
Version First Reported In: 6.9.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
URL: https://discuss.kde.org/t/how-to-list-keys-in-group-using-kreadconfig6/13912/4?u=rokejulianlockhart
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Roke Julian Lockhart Beedell 2025-01-10 13:17:07 UTC
SUMMARY
-------

KDE's CLI configuration acquisition and application tools (`kreadconfig6` and `kwriteconfig6` respectively) are unable to return valid keys via the CLI when a group is specified without a key.

For comparison, GNOME >30 provides this functionality via `dconf`.

STEPS TO REPRODUCE
------------------

Invoke `kreadconfig6 --file kdeglobals --group KDE`.

OBSERVED RESULT
---------------

When a value is not specified, the help documentation is returned.

EXPECTED RESULT
---------------

When a value is not specified, the available values should be returned.

SOFTWARE/OS VERSIONS
--------------------

> ~~~YAML
> Operating System: Fedora Linux 41
> KDE Plasma Version: 6.2.5
> KDE Frameworks Version: 6.9.0
> Qt Version: 6.8.1
> Kernel Version: 6.12.7-200.fc41.x86_64 (64-bit)
> Graphics Platform: Wayland
> Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
> Memory: 30.4 GiB of RAM
> Graphics Processor: AMD Radeon RX 5700
> ~~~

ADDITIONAL INFORMATION
----------------------

I've reported this to this package due to the undermentioned:

> ~~~log
> RokeJulianLockhart@SNRW3Q:~$ command -v 'kwriteconfig6'
> /usr/bin/kwriteconfig6
> RokeJulianLockhart@SNRW3Q:~$ dnf5 repoquery --whatprovides '/usr/bin/kwriteconfig6'
> Updating and loading repositories:
> Repositories loaded.
> kf6-kconfig-0:6.7.0-1.fc41.i686
> kf6-kconfig-0:6.7.0-1.fc41.x86_64
> kf6-kconfig-0:6.9.0-1.fc41.i686
> kf6-kconfig-0:6.9.0-1.fc41.x86_64
> RokeJulianLockhart@SNRW3Q:~$ rpm -qa 'kf6-kconfig'
> kf6-kconfig-6.9.0-1.fc41.x86_64
> ~~~
Comment 1 Euber Alexandre Barbosa 2025-10-07 11:18:53 UTC
Any update on this matter, or any tip where to start to implement this feature?
Comment 2 Roke Julian Lockhart Beedell 2025-10-07 11:20:48 UTC
(In reply to Euber Alexandre Barbosa from comment #1)

> Any update on this matter, or any tip where to start to implement this
> feature?

For the latter, I can't assist, but on the former point, no updates. You'd see them here.
Comment 3 Euber Alexandre Barbosa 2025-10-07 20:31:02 UTC
I found its code in https://invent.kde.org/frameworks/kconfig, more specifically in the /src/kreadconfig directory.

It's about a setter/reader of configuration files.

The hardest part will be gathering all the options from all KDE programs, and that's possible why it stops at that. haha

For example, the Elisa player has just a few options in its config file and its use a modern approach to set options: 
https://invent.kde.org/multimedia/elisa/-/blob/master/src/qml/SettingsForm.qml?ref_type=heads

but Dolphin is big and use a code files to set configurations options: 
https://invent.kde.org/system/dolphin/-/tree/master/src/settings/interface?ref_type=heads

Well, let's see how it goes :)