<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kconfig.git/autotests/kconfig_compiler/CMakeLists.txt, branch v5.84.0</title>
<subtitle>hurd kconfig.git</subtitle>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/'/>
<entry>
<title>kconfig_compiler : generate kconfig settings with subgroup</title>
<updated>2020-04-22T07:13:09+00:00</updated>
<author>
<name>Cyril Rossi</name>
<email>cyril.rossi@enioka.com</email>
</author>
<published>2020-02-03T12:50:17+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=00213a3a0906f0e1b5fa97a9e8de235a1e3cdcbf'/>
<id>00213a3a0906f0e1b5fa97a9e8de235a1e3cdcbf</id>
<content type='text'>
Summary: Following D27059, add `parentGroupName` attribute to `group` element to generate kconfig settings with subgroups

Reviewers: ervin, dfaure, #frameworks, meven

Reviewed By: ervin, meven

Subscribers: apol, meven, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27133
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary: Following D27059, add `parentGroupName` attribute to `group` element to generate kconfig settings with subgroups

Reviewers: ervin, dfaure, #frameworks, meven

Reviewed By: ervin, meven

Subscribers: apol, meven, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27133
</pre>
</div>
</content>
</entry>
<entry>
<title>fix min/max entries with dpointer</title>
<updated>2020-02-28T08:57:48+00:00</updated>
<author>
<name>Henri Chain</name>
<email>henri.chain@enioka.com</email>
</author>
<published>2020-02-28T08:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=f98feb16981350480bdb292cf157f70005d5be12'/>
<id>f98feb16981350480bdb292cf157f70005d5be12</id>
<content type='text'>
Summary:
D27497 was causing cases with dpointer + min/max to fail
Specifically, this okular build: https://build.kde.org/job/Applications/job/okular/job/kf5-qt5 SUSEQt5.12/175/console

Test Plan: Added min/max to dpointer autotest

Reviewers: meven, ervin

Subscribers: kde-frameworks-devel, aacid

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27717
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
D27497 was causing cases with dpointer + min/max to fail
Specifically, this okular build: https://build.kde.org/job/Applications/job/okular/job/kf5-qt5 SUSEQt5.12/175/console

Test Plan: Added min/max to dpointer autotest

Reviewers: meven, ervin

Subscribers: kde-frameworks-devel, aacid

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27717
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix tests after D27497</title>
<updated>2020-02-26T10:04:16+00:00</updated>
<author>
<name>Méven Car</name>
<email>meven.car@enioka.com</email>
</author>
<published>2020-02-26T09:57:54+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=ed960455a112f455695d85b1b5407db22a3369e7'/>
<id>ed960455a112f455695d85b1b5407db22a3369e7</id>
<content type='text'>
Summary: See https://phabricator.kde.org/D27497#618156

Test Plan: ctest

Reviewers: hchain, ervin, bport, crossi, #frameworks

Reviewed By: hchain

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27672
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary: See https://phabricator.kde.org/D27497#618156

Test Plan: ctest

Reviewers: hchain, ervin, bport, crossi, #frameworks

Reviewed By: hchain

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27672
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix code generation for entries with min/max</title>
<updated>2020-02-25T14:46:53+00:00</updated>
<author>
<name>Henri Chain</name>
<email>henri.chain@enioka.com</email>
</author>
<published>2020-02-18T22:21:30+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=d218b93a535085c85889164d45a83c3a519f9f4b'/>
<id>d218b93a535085c85889164d45a83c3a519f9f4b</id>
<content type='text'>
Summary:
- When GenerateProperties and Mutators are activated, the generated code
  did not handle min/max properly

- In the case of a parameterized entry, generated code also did not
  handle min/max

BUG: 418146

Test Plan: - auto tests included

Reviewers: meven, crossi, ervin, bport, tcanabrava

Reviewed By: meven, ervin

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27497
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
- When GenerateProperties and Mutators are activated, the generated code
  did not handle min/max properly

- In the case of a parameterized entry, generated code also did not
  handle min/max

BUG: 418146

Test Plan: - auto tests included

Reviewers: meven, crossi, ervin, bport, tcanabrava

Reviewed By: meven, ervin

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27497
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor KConfigXT</title>
<updated>2020-01-22T14:17:56+00:00</updated>
<author>
<name>Tomaz Canabrava</name>
<email>tcanabrava@kde.org</email>
</author>
<published>2020-01-18T19:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=95aee1294e32aca966dd306667386460cd12182d'/>
<id>95aee1294e32aca966dd306667386460cd12182d</id>
<content type='text'>
Summary:
The current KConfigXT compiler is in a sad state:
It's a massive file with loads of global variables that handle state, the generator is done within the main() function and it seems to have grown organically. There are no classes to separate logic / state / generation, what exists is code that generates code from a xml / ini pair, but it's hard to even discover what a bit of code is doing. The code istyle is C++ / Java from the nineties, which is not bad per see but it also uses quite a few things that are going to be deprecated in Qt 6 so I'm also taking the time make the code more streamlined with newer code style (no iterators, lambdas, auto usage, etc).

The code that generates the files simplly pushes strings to a text stream, and it's hard to figure out when something starts or something ends: for instance, the code that generates the Constructor has more than sixty lines of code englobing some nested if - for - if - for constructs.

Currently the code is "done" - there's one bug that I still need to find &amp; fix regarding Translations, but the rest seems sane.
The current testcode generates incorrect *whitespaces* regarding the old code (there's some parts that I feel that it's important to fix before merging, but overall, the whitespace changes are not bad and easier to handle, old code had a hand-counted amount of spaces before each line, new code has a function whitespace() that adds the current-and-correct amount of whitespaces based on indentation level that you start by startScope() and ends with endScope(). rest of the code still needs to be ported to it.

I plan to fix the testcases whitespace by manually adding them, I'v fougth with the code for a while and added a few hacks there but I don't want to make the code hackish again.

New code is not perfect by any means, but is a good step in the right direction.

This code tries to Separate the compiler code into many different files / classes to be more obvious what's happening, and each class also has many helper methods to minimize copypaste.

  -     CodeGenerator: Has base code for the header and source files that can be shared
  -     HeaderGenerator: Logic for generating the header file
  -     SourceGenerator: Logic for generating the source file
  -     KcfgParser: Logic for parsing the kcfg file and extracting the information from the Xml file
  -     CommonStructs: a header that contains the structs that are currently used everywhere.
  -     KConfigParameters: (was CfgConfig - ConfigConfig, wat) - Has information passed via the kcfgc file
  -     kcfg_compiler - will be renamed to main - start the other classes and generates the files.

This code here currently has the begining of this separation, with the CodeGenerator and the HeaderGenerator in a ~good~ state, but unfinished.

Test Plan:
- Run the test cases,
- Compare the diffs generated by the testcases and fix in the code the errors / differences
- Run and compare real kde source with the new and old generators to look for errors

Reviewers: #frameworks, ervin, bport, dfaure

Reviewed By: dfaure

Subscribers: davidre, bcooksley, cgiboudeaux, kossebau, bport, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26202
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The current KConfigXT compiler is in a sad state:
It's a massive file with loads of global variables that handle state, the generator is done within the main() function and it seems to have grown organically. There are no classes to separate logic / state / generation, what exists is code that generates code from a xml / ini pair, but it's hard to even discover what a bit of code is doing. The code istyle is C++ / Java from the nineties, which is not bad per see but it also uses quite a few things that are going to be deprecated in Qt 6 so I'm also taking the time make the code more streamlined with newer code style (no iterators, lambdas, auto usage, etc).

The code that generates the files simplly pushes strings to a text stream, and it's hard to figure out when something starts or something ends: for instance, the code that generates the Constructor has more than sixty lines of code englobing some nested if - for - if - for constructs.

Currently the code is "done" - there's one bug that I still need to find &amp; fix regarding Translations, but the rest seems sane.
The current testcode generates incorrect *whitespaces* regarding the old code (there's some parts that I feel that it's important to fix before merging, but overall, the whitespace changes are not bad and easier to handle, old code had a hand-counted amount of spaces before each line, new code has a function whitespace() that adds the current-and-correct amount of whitespaces based on indentation level that you start by startScope() and ends with endScope(). rest of the code still needs to be ported to it.

I plan to fix the testcases whitespace by manually adding them, I'v fougth with the code for a while and added a few hacks there but I don't want to make the code hackish again.

New code is not perfect by any means, but is a good step in the right direction.

This code tries to Separate the compiler code into many different files / classes to be more obvious what's happening, and each class also has many helper methods to minimize copypaste.

  -     CodeGenerator: Has base code for the header and source files that can be shared
  -     HeaderGenerator: Logic for generating the header file
  -     SourceGenerator: Logic for generating the source file
  -     KcfgParser: Logic for parsing the kcfg file and extracting the information from the Xml file
  -     CommonStructs: a header that contains the structs that are currently used everywhere.
  -     KConfigParameters: (was CfgConfig - ConfigConfig, wat) - Has information passed via the kcfgc file
  -     kcfg_compiler - will be renamed to main - start the other classes and generates the files.

This code here currently has the begining of this separation, with the CodeGenerator and the HeaderGenerator in a ~good~ state, but unfinished.

Test Plan:
- Run the test cases,
- Compare the diffs generated by the testcases and fix in the code the errors / differences
- Run and compare real kde source with the new and old generators to look for errors

Reviewers: #frameworks, ervin, bport, dfaure

Reviewed By: dfaure

Subscribers: davidre, bcooksley, cgiboudeaux, kossebau, bport, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26202
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Notify capability to KConfigXT</title>
<updated>2019-04-24T14:21:29+00:00</updated>
<author>
<name>Kai Uwe Broulik</name>
<email>kde@privat.broulik.de</email>
</author>
<published>2019-04-24T14:20:56+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=5d2ed13479a480111355657bf22324118fa576e9'/>
<id>5d2ed13479a480111355657bf22324118fa576e9</id>
<content type='text'>
Lets you specify Notifiers= in .kcfg for config entries that should be written with Notify flag,
i.e. announce the change to KConfigWatcher

Differential Revision: https://phabricator.kde.org/D20196
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lets you specify Notifiers= in .kcfg for config entries that should be written with Notify flag,
i.e. announce the change to KConfigWatcher

Differential Revision: https://phabricator.kde.org/D20196
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig_compiler: new kcfgc args HeaderExtension &amp; SourceExtension</title>
<updated>2019-03-15T05:55:13+00:00</updated>
<author>
<name>Friedrich W. H. Kossebau</name>
<email>kossebau@kde.org</email>
</author>
<published>2019-03-06T12:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=a3ed87ca7808363d8752f919617f88010ebf46b3'/>
<id>a3ed87ca7808363d8752f919617f88010ebf46b3</id>
<content type='text'>
Summary:
When using kconfig_compiler generated sources in projects where the used
file extensions for C++ files are not ".h" and/or ".cpp", the include for
the generated header looks a bit alien to the project, as well as the
generated source file if one looks closer at it.

This code adds new optional flags HeaderExtension &amp; SourceExtension which
can be used to control the file extensions used for the generated files.

Test Plan:
All unit tests and the new test_fileextensions pass, existing projects using
kcfg without &amp; with the new flags build fine.

Reviewers: #frameworks, apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19565
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
When using kconfig_compiler generated sources in projects where the used
file extensions for C++ files are not ".h" and/or ".cpp", the include for
the generated header looks a bit alien to the project, as well as the
generated source file if one looks closer at it.

This code adds new optional flags HeaderExtension &amp; SourceExtension which
can be used to control the file extensions used for the generated files.

Test Plan:
All unit tests and the new test_fileextensions pass, existing projects using
kcfg without &amp; with the new flags build fine.

Reviewers: #frameworks, apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19565
</pre>
</div>
</content>
</entry>
<entry>
<title>Generate an instance with KSharedConfig::Ptr for singleton and arg</title>
<updated>2017-01-06T08:52:45+00:00</updated>
<author>
<name>Martin Gräßlin</name>
<email>mgraesslin@kde.org</email>
</author>
<published>2016-11-16T13:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=e0db2422362260a2fea3a8e1de4c64011d2f183d'/>
<id>e0db2422362260a2fea3a8e1de4c64011d2f183d</id>
<content type='text'>
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.

The change is source-incompatible in the following situation:
* kcfgfile arg="true"
* Singleton = true
* Inherits is specified

In this situation the previous revision created an instance method with
a QString argument and passed that to the parent constructor. This is
not in accordance with the documentation. Any user of this behavior was
relying on a bug. With this change now the call to the parent
constructor carries a KSharedConfigPtr.

Test Plan:
kconfigcompiler tests still pass and a config with singleton
and arg="true" generates the code as I need it

Reviewers: #frameworks, dfaure, mdawson

Differential Revision: https://phabricator.kde.org/D3690
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

The change is source-incompatible in the following situation:
* kcfgfile arg="true"
* Singleton = true
* Inherits is specified

In this situation the previous revision created an instance method with
a QString argument and passed that to the parent constructor. This is
not in accordance with the documentation. Any user of this behavior was
relying on a bug. With this change now the call to the parent
constructor carries a KSharedConfigPtr.

Test Plan:
kconfigcompiler tests still pass and a config with singleton
and arg="true" generates the code as I need it

Reviewers: #frameworks, dfaure, mdawson

Differential Revision: https://phabricator.kde.org/D3690
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Generate an instance with KSharedConfig::Ptr for singleton and arg"</title>
<updated>2016-12-07T08:29:38+00:00</updated>
<author>
<name>David Faure</name>
<email>faure@kde.org</email>
</author>
<published>2016-12-07T08:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=4f9d7dde3a06da26d93e8f7ec98a283111a2d8c9'/>
<id>4f9d7dde3a06da26d93e8f7ec98a283111a2d8c9</id>
<content type='text'>
This reverts commit cd4e6504dfbdface00037625f0cedda511e6d839.

As suggested by Martin on release-team@kde.org, given that it breaks SC.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit cd4e6504dfbdface00037625f0cedda511e6d839.

As suggested by Martin on release-team@kde.org, given that it breaks SC.
</pre>
</div>
</content>
</entry>
<entry>
<title>Generate an instance with KSharedConfig::Ptr for singleton and arg</title>
<updated>2016-12-02T18:04:13+00:00</updated>
<author>
<name>Martin Gräßlin</name>
<email>mgraesslin@kde.org</email>
</author>
<published>2016-11-16T13:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=cd4e6504dfbdface00037625f0cedda511e6d839'/>
<id>cd4e6504dfbdface00037625f0cedda511e6d839</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
