Summary: | kconfig_compiler doesn't support nested namespaces | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Olivier Serve <tifauv> |
Component: | kdecore | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | frank78ac |
Priority: | NOR | ||
Version: | 4.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Proposed patch against version 4.2.4
Sample kcfg without namespace Sample kcfg with 1 namespace Sample kcfg with 2 nested namespaces Adds nested namespaces support for kconfig_compiler in trunk |
Description
Olivier Serve
2009-07-31 15:02:03 UTC
Created attachment 35753 [details]
Proposed patch against version 4.2.4
This patch adds 2 macros BEGIN_NAMESPACES() and END_NAMESPACES() which take care of adding the "namespace fff {" and "}" statements.
Also modifies the #ifndef/#define declarations to replace the "::" by "_".
Created attachment 35754 [details]
Sample kcfg without namespace
Created attachment 35755 [details]
Sample kcfg with 1 namespace
Created attachment 35756 [details]
Sample kcfg with 2 nested namespaces
It should be noted that the patch is largely inspired by the one from Shintaro Matsuoka in KDE 3.5 times (2006). See http://lists.kde.org/?l=kde-core-devel&m=115165296513848&w=2 Thanks for the patch! I can't comment on the patch because I'm not familiar with the kconfig stuff, but I think it might be better if you file a review request for kdelibs at http://reviewboard.kde.org/ This is usually the best way to make sure that your patch does not get overlooked (which may happen in bug reports, because it's not guaranteed that the right people will see your patch here). It might also be better to provide a patch for trunk instead of 4.2.4 because there will be no more KDE 4.2.x releaes. Created attachment 35789 [details]
Adds nested namespaces support for kconfig_compiler in trunk
SVN commit 1006088 by pino: Fix namespace support, by taking into account possible multiple levels (eg Foo::Bar::Baz::etc) and writing their opening/closing correctly. Based on a patch by Olivier Serve <tifauv@gmail.com> (thanks!), slightly polished by me (also to give 100% output compatibility). Add a test3a testcase (basically copied from test3) to the kconfig_compiler test suite for this. BUG: 202088 M +32 -13 kdecore/kconfig_compiler/kconfig_compiler.cpp M +12 -0 kdeui/tests/kconfig_compiler/CMakeLists.txt M +2 -0 kdeui/tests/kconfig_compiler/kconfigcompiler_test.cpp A kdeui/tests/kconfig_compiler/test3a.cpp.ref A kdeui/tests/kconfig_compiler/test3a.h.ref A kdeui/tests/kconfig_compiler/test3a.kcfg A kdeui/tests/kconfig_compiler/test3a.kcfgc A kdeui/tests/kconfig_compiler/test3amain.cpp [License: BSD X11 (BSD like)] WebSVN link: http://websvn.kde.org/?view=rev&revision=1006088 |