*** zbenjamin is now known as Guest42128 | 01:41 | |
*** zbenjamin_ is now known as zbenjamin | 01:41 | |
*** frinring_ is now known as frinring | 03:08 | |
*** nyov is now known as Guest25309 | 03:31 | |
nephros | Can 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 |
---|---|---|
Tomin | I 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 do | 12:45 |
nephros | Tomin: will try that, thanks! | 12:58 |
nephros | but I guess /usr/lib/qt5/qml/Nemo/Configuration/plugins.qmltypes not having "unset" anywhere I can't actually call that. | 12:59 |
Tomin | ah, yes. I was looking at the C++ side. Let me check the qml plugin | 13:00 |
Tomin | try setting it to undefined, that might work | 13:02 |
Tomin | source 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.cpp | 13:03 |
Tomin | and 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 case | 13:07 |
Tomin | (currently there is no RESET function so setting value to undefined might not do anything apart from printing an error) | 13:09 |
nephros | Yeah 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 |
nephros | seems that this is not possible. Thanks anyway. | 13:13 |
Tomin | I was thinking confValue.value = undefined | 13:14 |
Tomin | where confValue is an id of a ConfigurationValue instance | 13:14 |
Tomin | but perhaps it doesn't work | 13:15 |
Tomin | If you tried to do it in C++ MDConfGroup's setValue(key, QVariant()) should work I think | 13:23 |
*** pyllyukk1 is now known as pyllyukko | 16:45 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!