readEntry and booleans

Thomas Braxton brax108 at cox.net
Thu Jan 5 20:14:44 GMT 2006


On Thursday 05 January 2006 06:24, David Faure wrote:
> The point is that people who compile with debug are willing to debug - so a
> crash is fine - and people who get release binaries are not willing to
> debug, so for them it's better to just try to cope with the problem as much
> as we can without bothering the user. A kdWarning helps in case the user
> reports some problem to us though.

How about this patch? I define kcbError depending on NDEBUG to 
kdWarning/kdFatal. gcc defines NDEBUG when it's not in debug mode, other 
compilers do the same, right? So for release builds it should just print a 
warning.

In the template code I could probably change it to a compile time concept 
check, but it's been a while since I've done any meta-programming, so it 
might take a few days while I get back up to speed. I think the concept check 
would be a good idea because it would catch most errors at compile time, 
where the programmer could fix them before they got out to users.

The only one I can't do much about is writing a QVariantList, because the 
programmer must ensure that only types that can be converted to string are 
passed in. Otherwise we would have to write a full encoder/decoder for any 
type that we want to be able to pass in a QVariantList. This would mean 
reading/writing lists inside lists and other nasties, sounds like it would be 
a PITA for something most applications probably wouldn't use.

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-diff
Size: 3463 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060105/f7d637fc/attachment.diff>


More information about the kde-core-devel mailing list