Review Request: Add support for nested namespaces to kconfig_compiler

Pino Toscano pino at kde.org
Mon Aug 3 01:34:33 BST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1218/#review1889
-----------------------------------------------------------


A slightly changed version of this has been committed, so you can close this review request.

Thanks!

- Pino


On 2009-08-02 23:46:06, Olivier Serve wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1218/
> -----------------------------------------------------------
> 
> (Updated 2009-08-02 23:46:06)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> This patch adds support for nested namespaces to kconfig_compiler.
> 
> If you try to use "Namespace=foo::bar" in a .kcfgc file, kconfig_compiler will generate code that doesn't compile.
> 
> The patch does three things :
>   1. define 2 macros to add the start-of-namespace and end-of-namespace statements ;
>   2. replace the '::' by '_' in the #ifndef/#define part of the header (so that gcc doesn't issue a warning)
>   3. use the macros 3 times (once in the .h, twice in the .cpp)
> 
> Take a look at the associated bug report : https://bugs.kde.org/show_bug.cgi?id=202088
> 
> 
> This addresses bug 202088.
>     https://bugs.kde.org/show_bug.cgi?id=202088
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kdecore/kconfig_compiler/kconfig_compiler.cpp 1006011 
> 
> Diff: http://reviewboard.kde.org/r/1218/diff
> 
> 
> Testing
> -------
> 
> First, kconfig_compiler compiles fine :-)
> 
> Then, I tested with 3 sample .kcfgc (no namespace, 1 namespace, 2 nested namespaces) and the results seems OK to me.
> Here are the sample kcfgc files :
> 
> ---------- nons.kcfgc ----------
> File=libplop_la.kcfg
> ClassName=NoNS
> Singleton=true
> Mutators=true
> --------------------------------
> 
> ---------- with1ns.kcfgc ----------
> File=libplop_la.kcfg
> ClassName=With1NS
> Namespace=ns1
> Singleton=true
> Mutators=true
> --------------------------------
> 
> ---------- with2ns.kcfgc ----------
> File=libplop_la.kcfg
> ClassName=With2NS
> Namespace=ns1::ns2
> Singleton=true
> Mutators=true
> --------------------------------
> 
> 
> Thanks,
> 
> Olivier
> 
>





More information about the kde-core-devel mailing list