Review Request: Add SetDefaultFoo calls when mutators are enabled in kconfig_compiler generated files

Parker Coates parker.coates at gmail.com
Wed Jun 24 17:33:27 BST 2009


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


My first thought was, shouldn't this be enabled/disabled by a kcfgc entry? I'm not necessarily saying it should, but since so many other options are included there, it kind of makes sense.

I'm also wondering if this is the most flexible way to implement this feature. My first instinct would have been to add getters for the default values. This would mean calling Settings::setFontSize(Settings::defaultFontSize()) instead of your simpler suggestion of Settings::setDefaultFontSize(), but it would also provide an easy way to read an item's default value without having to set it, which could probably be handy at times. Although, I guess the two options needn't be mutually exclusive.

Anyway, those are just my thoughts. I think the functionality makes sense, however it ends up being implemented.




- Parker


On 2009-06-24 08:24:47, Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/881/
> -----------------------------------------------------------
> 
> (Updated 2009-06-24 08:24:47)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> Adds a setDefaultFoo to the generated config file that resets the Foo value to its default when mutators are enabled. It is useful because otherwise getting the default value once the user has changed it is not possible. For example in kscd i would use it to reset the theme to the default value if the current theme is not accessible anymore (for example we dropped it)
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdecore/kconfig_compiler/kconfig_compiler.cpp 986298 
> 
> Diff: http://reviewboard.kde.org/r/881/diff
> 
> 
> Testing
> -------
> 
> Compiled all kdegraphics and kdemultimedia config files
> 
> 
> Thanks,
> 
> Albert
> 
>





More information about the kde-core-devel mailing list