Review Request: Add defaultFooValue calls to enabled in kconfig_compiler generated files

Albert Astals Cid aacid at kde.org
Sat Jun 27 12:34:58 BST 2009



> On 2009-06-27 02:15:00, Parker Coates wrote:
> > On line 1156, s/set/get/.
> > 
> > I'm not sure about the format of the function name "default*Value()". This is mostly just a matter of personal preference, but I like just "default*()". It's shorter and gives a nice set of three methods: "*()", "set*()" and "default*()", all of which end with the item name.

I first went with default*() but it resulted in weird names for some accessors for example PrintEnlargeSmallerImages was defaultPrintEnlargeSmallerImages and seemed like a setter that said "i want you to default to print enlarge smaller images" than a getter that said "i want the default value of the PrintEnlargeSmallerImages" entry.


- Albert


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


On 2009-06-27 04:31:29, Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/881/
> -----------------------------------------------------------
> 
> (Updated 2009-06-27 04:31:29)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> Adds a defaultFooValue to the generated config file that returns the default Foo value. 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