diff options
| author | Martin Gräßlin <mgraesslin@kde.org> | 2016-11-16 14:59:28 +0100 |
|---|---|---|
| committer | Martin Gräßlin <mgraesslin@kde.org> | 2016-12-02 19:04:13 +0100 |
| commit | cd4e6504dfbdface00037625f0cedda511e6d839 (patch) | |
| tree | 249936486aab5e16f9d002c73f1829dcfb7f53fa /autotests/kconfig_compiler/test8c.kcfg | |
| parent | 5950ee535d24565c434a410e70913856b2d58c23 (diff) | |
| download | kconfig-cd4e6504dfbdface00037625f0cedda511e6d839.tar.gz kconfig-cd4e6504dfbdface00037625f0cedda511e6d839.tar.bz2 | |
Generate an instance with KSharedConfig::Ptr for singleton and arg
Summary:
In case a kcfg with arg="true" was used and singleton the static
instance method only accepted a QString config name. This made it
impossible to combine a singleton config with an already existing and
open KSharedConfig::Ptr.
With this change an overloaded instance method is added which takes a
KSharedConfig::Ptr as argument. The private ctor, though, only takes a
KSharedConfig::Ptr and the instance method taking a QString argument
uses KSharedConfig::openConfig on the config file name.
This provides full API compatibility and at the same time allows to use
KSharedConfig in addition to the arg name based variant.
Test Plan:
kconfigcompiler tests still pass and a config with singleton
and arg="true" generates the code as I need it
Reviewers: #frameworks
Differential Revision: https://phabricator.kde.org/D3386
Diffstat (limited to 'autotests/kconfig_compiler/test8c.kcfg')
| -rw-r--r-- | autotests/kconfig_compiler/test8c.kcfg | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/autotests/kconfig_compiler/test8c.kcfg b/autotests/kconfig_compiler/test8c.kcfg new file mode 100644 index 00000000..24038a69 --- /dev/null +++ b/autotests/kconfig_compiler/test8c.kcfg @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 + http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > + <kcfgfile arg="true"/> + + <group name="Group"> + <entry name="Font" type="Font"> + <default code="true">QFont()</default> + </entry> + + <entry name="TitleFont" type="Font"> + <default code="true">QFont()</default> + </entry> + </group> +</kcfg> |
