Bug 174850

Summary: kconfig_compiler produces invalid code
Product: [Frameworks and Libraries] kdelibs Reporter: urwald <urwald>
Component: kdecoreAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: settings_general.kcfg
settings_general.kcfgc
settings_general.h
settings_general.cpp

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.