<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kconfig.git/autotests/kconfig_compiler, branch v5.73.0-rc1</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>KConfig: Convert to SPDX license statements</title>
<updated>2020-03-22T11:46:41+00:00</updated>
<author>
<name>Andreas Cord-Landwehr</name>
<email>cordlandwehr@kde.org</email>
</author>
<published>2020-03-22T11:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=43d4f1276b3afe259907add9b458f15252514fa4'/>
<id>43d4f1276b3afe259907add9b458f15252514fa4</id>
<content type='text'>
Summary:
Convert license headers to SPDX statements and add
license files as required by REUSE specification.

Reviewers: cgiboudeaux

Reviewed By: cgiboudeaux

Subscribers: ognarb, cgiboudeaux, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T11550

Differential Revision: https://phabricator.kde.org/D27601
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Convert license headers to SPDX statements and add
license files as required by REUSE specification.

Reviewers: cgiboudeaux

Reviewed By: cgiboudeaux

Subscribers: ognarb, cgiboudeaux, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T11550

Differential Revision: https://phabricator.kde.org/D27601
</pre>
</div>
</content>
</entry>
<entry>
<title>Autotest file showing wrong File path</title>
<updated>2020-03-19T22:41:37+00:00</updated>
<author>
<name>Ömer Fadıl USTA</name>
<email>omerusta@gmail.com</email>
</author>
<published>2020-03-19T22:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=67630e49d69c03eddbb9c291ebc075b342ebfae5'/>
<id>67630e49d69c03eddbb9c291ebc075b342ebfae5</id>
<content type='text'>
It is a small trivial typo about showing same file instead of actual
config file.

REVIEW: D28151
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is a small trivial typo about showing same file instead of actual
config file.

REVIEW: D28151
</pre>
</div>
</content>
</entry>
<entry>
<title>KconfigXT: Add a value attribute to Enum field choices</title>
<updated>2020-03-08T18:02:19+00:00</updated>
<author>
<name>Méven Car</name>
<email>meven29@gmail.com</email>
</author>
<published>2020-03-05T09:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=ec207330d5bd61799a47092bf555a523ab000f93'/>
<id>ec207330d5bd61799a47092bf555a523ab000f93</id>
<content type='text'>
Summary:
Allow to write choices such as :
```
&lt;choices&gt;
    &lt;choice name="enum_name" value="I can't containt (anything)"&gt;&lt;/choice&gt;
    &lt;choice name="normal_choice"&gt;&lt;/choice&gt;
&lt;/choices&gt;
```

Test Plan: ctest

Reviewers: ervin, bport, crossi, #frameworks

Reviewed By: ervin

Subscribers: ngraham, davidre, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27463
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Allow to write choices such as :
```
&lt;choices&gt;
    &lt;choice name="enum_name" value="I can't containt (anything)"&gt;&lt;/choice&gt;
    &lt;choice name="normal_choice"&gt;&lt;/choice&gt;
&lt;/choices&gt;
```

Test Plan: ctest

Reviewers: ervin, bport, crossi, #frameworks

Reviewed By: ervin

Subscribers: ngraham, davidre, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27463
</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>Fix is&lt;PropertyName&gt;Immutable generated property</title>
<updated>2020-02-19T13:24:20+00:00</updated>
<author>
<name>Méven Car</name>
<email>meven.car@enioka.com</email>
</author>
<published>2020-02-19T10:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=55aaa712b75b1401331e29aef08123556b0257f3'/>
<id>55aaa712b75b1401331e29aef08123556b0257f3</id>
<content type='text'>
Summary: Relates to D26368

Test Plan: ctest

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

Reviewed By: hchain, crossi

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27496
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary: Relates to D26368

Test Plan: ctest

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

Reviewed By: hchain, crossi

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27496
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an is&lt;PropertyName&gt;Immutable to know if a property is immutable</title>
<updated>2020-02-04T15:09:29+00:00</updated>
<author>
<name>Méven Car</name>
<email>meven.car@enioka.com</email>
</author>
<published>2020-02-04T15:03:52+00:00</published>
<link rel='alternate' type='text/html' href='https://netuse.dynamicmalloc.com/cgit/kconfig.git/commit/?id=d46739294d04c72af1e434e414e1c012d7e78a42'/>
<id>d46739294d04c72af1e434e414e1c012d7e78a42</id>
<content type='text'>
Summary:
Add a utility function is&lt;Parameter&gt;Immutable to access immutability quickly.
Generated classes uses them internally to avoid code redundance.

Sample:
```
    /**
      Set blocked-by-default
    */
    void setBlockedByDefault( bool v )
    {
      if (v != mBlockedByDefault &amp;&amp; !isBlockedByDefaultImmutable() )  {
        mBlockedByDefault = v;
        Q_EMIT blockedByDefaultChanged();
      }
    }

    /**
      Is blocked-by-default Immutable
    */
    bool isBlockedByDefaultImmutable()
    {
      return isImmutable( QStringLiteral( "blockedByDefault" ) );
    }
```

```
    /**
      Set org.kde.ActivityManager.ResourceScoringEnabled
    */
    void setResourceScoringEnabled( bool v )
    {
      if (!isResourceScoringEnabledImmutable() )
        mResourceScoringEnabled = v;
    }

    /**
      Is org.kde.ActivityManager.ResourceScoringEnabled Immutable
    */
    bool isResourceScoringEnabledImmutable()
    {
      return isImmutable( QStringLiteral( "resourceScoringEnabled" ) );
    }
```

Reviewers: ervin, #frameworks, dfaure

Reviewed By: ervin

Subscribers: dfaure, tcanabrava, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26368
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Add a utility function is&lt;Parameter&gt;Immutable to access immutability quickly.
Generated classes uses them internally to avoid code redundance.

Sample:
```
    /**
      Set blocked-by-default
    */
    void setBlockedByDefault( bool v )
    {
      if (v != mBlockedByDefault &amp;&amp; !isBlockedByDefaultImmutable() )  {
        mBlockedByDefault = v;
        Q_EMIT blockedByDefaultChanged();
      }
    }

    /**
      Is blocked-by-default Immutable
    */
    bool isBlockedByDefaultImmutable()
    {
      return isImmutable( QStringLiteral( "blockedByDefault" ) );
    }
```

```
    /**
      Set org.kde.ActivityManager.ResourceScoringEnabled
    */
    void setResourceScoringEnabled( bool v )
    {
      if (!isResourceScoringEnabledImmutable() )
        mResourceScoringEnabled = v;
    }

    /**
      Is org.kde.ActivityManager.ResourceScoringEnabled Immutable
    */
    bool isResourceScoringEnabledImmutable()
    {
      return isImmutable( QStringLiteral( "resourceScoringEnabled" ) );
    }
```

Reviewers: ervin, #frameworks, dfaure

Reviewed By: ervin

Subscribers: dfaure, tcanabrava, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26368
</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>
</feed>
