KConfigXT bug+proposed patch+questions

Marco Gulino marco at kmobiletools.org
Thu May 10 23:46:06 BST 2007


Up :)
I'm going to commit it tomorrow if anybody cares (as i need it to change 
kmobiletools code, it won't compile without...)

Il Wednesday 09 May 2007 19:10:29 Marco Gulino ha scritto:
> I was playing a bit with KConfigXT, trying to export a configuration class
> without breaking binary compatibility, i have in facts a template class
> (KMobileTools::Engine) and various engines, that are meant to be compiled
> as external modules.
> I was thinking about two solutions:
> 1) generate a kconfigxt file with d-pointer members, so nothing private in
> there, that can be exported as public include in /includes/kmobiletools/
> 2) i also noticed that there are a lot of kcfg files installed in
> $KDEDIR/share/config.kcfg... how could i use this?
>
> While looking into the solution 1) i noticed that there's a bug in
> kconfig_compiler if using both d-pointer members and namespace.
> Below there is my proposed patch, can i commit it?
>
> Index: kconfig_compiler.cpp
> ===================================================================
> --- kconfig_compiler.cpp        (revision 662899)
> +++ kconfig_compiler.cpp        (working copy)
> @@ -1678,6 +1678,8 @@ int main( int argc, char **argv )
>    // private class implementation
>    if ( dpointer )
>    {
> +    if ( !nameSpace.isEmpty() )
> +      cpp << "namespace " << nameSpace << " {" << endl;
>      cpp << "class " << className << "Private" << endl;
>      cpp << "{" << endl;
>      cpp << "  public:" << endl;
> @@ -1705,6 +1707,8 @@ int main( int argc, char **argv )
>      }
>
>      cpp << "};" << endl << endl;
> +    if ( !nameSpace.isEmpty() )
> +      cpp << "}" << endl << endl;
>    }
>
>    // Singleton implementation



-- 
KMobileTools - Open Source meets Mobile Phones.
http://www.kmobiletools.org
RockMan's home page
http://rockman.altervista.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070511/8fd2a46d/attachment.sig>


More information about the kde-core-devel mailing list