Bug 174850 - kconfig_compiler produces invalid code
Summary: kconfig_compiler produces invalid code
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdecore (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 11:08 UTC by urwald
Modified: 2009-10-16 13:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
settings_general.kcfg (8.32 KB, application/xml)
2008-11-11 11:09 UTC, urwald
Details
settings_general.kcfgc (169 bytes, text/plain)
2008-11-11 11:09 UTC, urwald
Details
settings_general.h (18.97 KB, text/x-chdr)
2008-11-11 11:09 UTC, urwald
Details
settings_general.cpp (13.80 KB, text/x-c++src)
2008-11-11 11:09 UTC, urwald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description urwald 2008-11-11 11:08:35 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    SuSE RPMs

I call kconfig_compiler like this:

kconfig_compiler ./settings_general.kcfg ./settings_general.kcfgc

I expect that a valid settings_general.h is generated. However, the generated code is invalid.

For example, in line 728, I find:

static
    void setLimitConnectionsToX( QString v )
    {
      if (v < 1)
[...]

This can't work, limitConnectionsToX is of type ULongLong, but the function is declared with QString as argument.

This bug occurs sometimes, maybe in 1 of 4 tries. I don't understand, when it occures and when not. A reset helps sometimes, and sometimes not.

Furthermore, when producing bad code, at the same time kconfig_compiler seems to not understand comments in the kcfgc file (things like "Mutators=true ; This is a comment"). I had to remove the comments because for className=settings_general (and MemberVariables=private), the comments where copied to the code just like the class name itself.
Comment 1 urwald 2008-11-11 11:09:16 UTC
Created attachment 28487 [details]
settings_general.kcfg
Comment 2 urwald 2008-11-11 11:09:29 UTC
Created attachment 28488 [details]
settings_general.kcfgc
Comment 3 urwald 2008-11-11 11:09:45 UTC
Created attachment 28489 [details]
settings_general.h
Comment 4 urwald 2008-11-11 11:09:57 UTC
Created attachment 28490 [details]
settings_general.cpp
Comment 5 Christoph Feck 2009-10-16 04:04:24 UTC
There have been some commits to the compiler in the recent months. Additionally, I ran it using valgrind using your test files, without any problems. If you cannot reproduce it either anymore, please close the bug.
Comment 6 urwald 2009-10-16 13:01:18 UTC
Hm, I don't make a call of kconfig_compiler in the way described in this bug anymore. Now I let CMake do this job. (However, this way I hadn't any problems.)

So closing as WORKSFORME.