[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] Allow reading of values on invalid KConfigGroups
From:       Sebastian =?iso-8859-1?q?Tr=FCg?= <sebastian () trueg ! de>
Date:       2009-02-24 14:59:49
Message-ID: 200902241559.50141.sebastian () trueg ! de
[Download RAW message or body]

On Tuesday 24 February 2009 15:08:34 Thomas Braxton wrote:
> I don't know why you would want to read from an invalid group, but
> wouldn't it make the patch a lot easier if you just returned the
> default right away if the group is invalid? i.e.
>
> replace
>     Q_ASSERT(isValid());
> with
>     if (!isValid()) {
>         return aDefault;
>     }

yes, I just like one-exit-point methods better. But I don't really care. :)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic