Is there a way to list all keys/values from a ConfigurationGroup?

As per title, looks like you can only clear all values as both setValue and value require you to know the key, anybody knows a way?

dconf dump /apps/harbour-appname/
1 Like

Yeah, I mean from QML using the whole Nemo.Configuration plugin
Edit: or to be even more specific QML-only and harbour-compatible

It can be done with a direct call to dconf_client_list like this but that won’t be harbour-compatible. Dependency on libdconf.so.1 isn’t allowed (unless you load it dynamically with dlopen).

1 Like

I guess from pure qml the answer is no.

The old-school hack (if C++ is a no-go) is to have a small Python script which executes the dconf command.
But if you’re using Python you might as well use its own dconf interface.

Nemo.Configuration is open source though, so someone could add such functionality: GitHub - sailfishos/nemo-qml-plugin-configuration

Edit: It seems Nemo.Configuration is a very thin wrapper around mlite which has a resolveProperties method and a children property.
So maybe doing that is very simple.

2 Likes

Good point about mlite, it’s harbour compatible. MGConfItem::listDirs() looks promising to me.

3 Likes

Thanks a ton, I assumed I just missed something obvious. I guess there is no escaping SQL(ite) after all