Sunday, 2021-04-04

*** zbenjamin is now known as Guest4212801:41
*** zbenjamin_ is now known as zbenjamin01:41
*** frinring_ is now known as frinring03:08
*** nyov is now known as Guest2530903:31
nephrosCan I "dconf reset" (delete) a property from a ConfigurationGroup somehow, so the key is removed completely from dconf? I know I can clear() the whole group, but I want to just delete a specific value.11:41
TominI think unset() does that. It's not totally clear reading the source https://git.sailfishos.org/mer-core/mlite/blob/master/src/mgconfitem.cpp (and mgconfitem.h) and dconf documentation https://developer.gnome.org/dconf/unstable/DConfClient.html#dconf-client-write-fast but I think that's what dconf_client_write_fast() would usually do12:45
nephrosTomin: will try that, thanks!12:58
nephrosbut I guess /usr/lib/qt5/qml/Nemo/Configuration/plugins.qmltypes not having "unset" anywhere I can't actually call that.12:59
Tominah, yes. I was looking at the C++ side. Let me check the qml plugin13:00
Tomintry setting it to undefined, that might work13:02
Tominsource is here, if it helps at all. it's mainly just a wrapper around MGConfItem https://git.sailfishos.org/mer-core/nemo-qml-plugin-configuration/blob/master/src/configurationvalue.cpp13:03
Tominand if undefined doesn't work perhaps null would. I think it should provide RESET function if undefined doesn't work to allow this kind of use case13:07
Tomin(currently there is no RESET function so setting value to undefined might not do anything apart from printing an error)13:09
nephrosYeah what happens is that with setValue("foo", null) I get a conversion error, and with setValue("foo", typeof("nothing")) it converts "undefined" to a string and sets that ;)13:12
nephrosseems that this is not possible. Thanks anyway.13:13
TominI was thinking confValue.value = undefined13:14
Tominwhere confValue is an id of a ConfigurationValue instance13:14
Tominbut perhaps it doesn't work13:15
TominIf you tried to do it in C++ MDConfGroup's setValue(key, QVariant()) should work I think13:23
*** pyllyukk1 is now known as pyllyukko16:45

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!