summaryrefslogtreecommitdiff
path: root/configmgr/source/dconf.cxx
AgeCommit message (Collapse)Author
2023-12-07tdf#157432 Expert config: Allow filtering by changed valuesSamuel Mehrbrodt
Change-Id: Ib8bbb7fc9e8014a9367278f3fa640f53af46dd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159986 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-20Extended loplugin:ostr: configmgrStephan Bergmann
Change-Id: If9cc1f0c18a5fa344a433b338f81d191340e70f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159722 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-15Bump dconf minimum version requirementStephan Bergmann
At least building on Fedora 37 with dconf-devel-0.40.0-7.fc37.x86_64 against recent LLVM 17 trunk libc++ started to fail now with > In file included from configmgr/source/dconf.cxx:25: > In file included from /usr/include/dconf/dconf.h:23: > In file included from /usr/include/dconf/common/dconf-enums.h:23: > In file included from /usr/include/glib-2.0/glib.h:34: > In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34: > In file included from /usr/include/glib-2.0/glib/gthread.h:34: > In file included from /usr/include/glib-2.0/glib/gatomic.h:30: > In file included from /usr/include/glib-2.0/glib/glib-typeof.h:44: > In file included from ~/llvm/inst/bin/../include/c++/v1/type_traits:430: > ~/llvm/inst/bin/../include/c++/v1/__type_traits/aligned_union.h:23:1: error: templates must have C++ linkage > template <size_t _I0, size_t ..._In> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > configmgr/source/dconf.cxx:19:1: note: extern "C" language linkage specification begins here > extern "C" { > ^ because the missing extern "C" has meanwhile been added to upstream dconf with <https://gitlab.gnome.org/GNOME/dconf/-/commit/f860ddcc6a501b982d82c5630c73936bd611ad8a> "common: Add missing G_BEGIN/END_DECLS" towards tag 0.40.0. So the easiest fix here appears to be to bump our requirements to that dconf version 0.40.0: The one case I'm aware of that explicitly wants dconf support is downstream Fedora and RHEL builds, which already have dconf 0.40.0 (cf. most recent <https://src.fedoraproject.org/rpms/dconf/blob/a9987b0abe15133d091bcd390fd33077881567ae/f/dconf.spec#_4> for f37 and most recent <https://gitlab.com/redhat/centos-stream/rpms/dconf/-/blob/1bb6b46da242b75e5e1864f5c97ab6e592ca60ba/dconf.spec#L4> for e9s). On the other hand, the TDF Linux release builds are done with an explicit --disable-dconf in distro-configs/LibreOfficeLinux.conf (since ecc617e797aa5ed329668114e54ec7ffa5c0e87b "configmgr: support reading from a dconf layer (WIP)") and the Flatpak builds on Flathub are done against an org.freedesktop.Sdk//22.08 where no dconf support is detected at all (for the most recent LO 7.5.1 build on Flathub see > checking for DCONF... no > checking whether to enable dconf... no at <https://buildbot.flathub.org/#/builders/5/builds/3184/steps/8/logs/stdio> for aarch64 and at <https://buildbot.flathub.org/#/builders/5/builds/3184/steps/8/logs/stdio> for x86_64). Change-Id: I559d2ac8712dbe2b40c9b881314b88d1cc8eaf43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148887 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-23fix configmgr --enable-dconf buildCaolán McNamara
error: no viable conversion from 'const char [1]' to 'std::u16string_view' (aka 'basic_string_view<char16_t>') and warning: instead of an 'rtl::OUString' constructed from a 'char16_t', pass a 'std::u16string_view' (or an 'rtl::OUStringChar') [loplugin:stringview] Change-Id: I0e611606190f063227c5467dc5a082277cebaaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125706 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09Mark workaround as fixed upstreamStephan Bergmann
Change-Id: I808f0b26916eece2d4fae3c7d1e73c847905adf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112208 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-18use for-range on Sequence in cli_ure..connectivityNoel Grandin
Change-Id: Ic5254e402d153a13c29928b59738cbe1603d0139 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-15clang-tidy modernize-concat-nested-namespace in codemaker..configmgrNoel Grandin
Change-Id: I48452480fae169e11d60b125bbd0226b6a35a25c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86800 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13configmgr: workaround GCC9 -Werror=sign-compare in static_assertMichael Stahl
... which is quite unhelpful; any cast would have to make assumptions about the size of types anyway... Change-Id: I5f35d82eb35d1af36b5a572166cf863babf23d41 Reviewed-on: https://gerrit.libreoffice.org/72223 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-11-02fix signatures of deleted copy/assign operatorsNoel Grandin
Change-Id: Id1a0749b78a7021be3564487fb974d7084705129 Reviewed-on: https://gerrit.libreoffice.org/62718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-09Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from a* to configmgr Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a Reviewed-on: https://gerrit.libreoffice.org/57170 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-09Missing template clone() in configmgr dconf modeStephan Bergmann
...that could cause infinite recursion, e.g. when an erroneously modified /org.openoffice.ucb.Hierarchy/Entry template (which recursively has children of the same template type) is later used to instantiate a new set member. Change-Id: I7b9e55fa1c92979aed98b9f23f4432600afffed4 Reviewed-on: https://gerrit.libreoffice.org/54023 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-23loplugin:includeform: configmgrStephan Bergmann
Change-Id: Ie3b0b80409a7897db6700c80d6ff41dbb4845652
2017-08-30loplugin:constparamsStephan Bergmann
Change-Id: I8bc9fd2a3ad727f1a0f4b98254efdae085a2b8cd
2017-08-11error: ‘class configmgr::NodeMap’ has no member named ‘emplace’Caolán McNamara
Change-Id: I434739024afa97d05b5cf6e959973d845fdb2dfe
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:salunicodeliteral: configmgrStephan Bergmann
Change-Id: I3c37025be286f9fd1892c259e2ac1e2fce7123a1
2016-01-07Fix typosAndrea Gelmini
Change-Id: I90b04b8eda6fc3d530c9db72052720cbe9de0343 Reviewed-on: https://gerrit.libreoffice.org/21197 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-21configmgr/dconf: Simplify Fleet Commander write-back modeStephan Bergmann
* Get rid of different dconf trees for reading and writing again; the one single tree is /org/libreoffice/registry/. * Trigger the special write-back mode when a file $SYSUSERCONFIG/libreoffice/dconfwrite is present; then, ignore the default user:!... entry in CONFIGURATION_LAYERS (i.e., don't use the UserInstallation's registrymodifications.xcu) and instead write changes back to the dconf tree. Change-Id: I6b4d7251851da3fe7abbc9dcb080d57b278de96b
2015-09-29Avoid false -Werror=maybe-uninitializedStephan Bergmann
Change-Id: I5493c49eb97c630e91cdc8368ad8b017557f1fa1
2015-09-02Fix documentationStephan Bergmann
Change-Id: I8fc081d3f445a362f5e1ee735ce8baeab1d6cc9b
2015-09-02configmgr: Split dconf in two /org/libreoffice/registry/{system,user}/Stephan Bergmann
...so that the lower-layer "dconf:*" reads from the .../system/ dconf tree while the final-layer "dconf:!" reads from and writes to the .../user/ dconf tree. Using a single tree would not really work: For one, a sysadmin will want to finalize a property so it cannot be changed by extensions; that means that property must be set and finalized in the lower-layer "dconf:*". But for another, a user will want to change a property for which an extension provides a value; that means that property must be set in the final-layer "dconf:!". So the two "dconf:*" and "dconf:!" must store their respective data in different places. Change-Id: I9029e7f779bcb86e8f26cfc22401e97e0cb3362b
2015-09-01configmgr: support writing back to dconf (WIP)Stephan Bergmann
Needs to be enabled manually for now by changing CONFIGURATION_LAYERS's tail from " user:..." to " user:*... dconf:!". Change-Id: I31cd806f21d2ded376832faf98f49167b7243d1c
2015-09-01dconf: Change the way set elements are encodedStephan Bergmann
...to avoid having multiple dconf paths for the same set element (with different template names or operations encoded into the dconf path segment), esp. when introducing write-back into dconf. Change-Id: Ieebad3b1024dd7607022abbfa963850b05c26d65
2015-09-01Handle dconf_client_new failureStephan Bergmann
Change-Id: Ib873ca03a2552dc0405236ed87040672ba359e5e
2015-09-01dconf: fix check for matching templateStephan Bergmann
Change-Id: I8319bf10310d55e2f29de8103d983e34a53f87df
2015-09-01dconf: fix encoding of set element namesStephan Bergmann
Change-Id: I6aba45a70a9ebee65be34af1036bb515fd2a22b7
2015-09-01Rename stuff, in preparation of dconf::writeModificationsStephan Bergmann
Change-Id: Icd472e91b222907e2cdcbdba1b78b33c44eff566