[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: getting rid of the ReverseStateChange enum in kxmlguiclient.h
From: Guillaume Laurent <glaurent () telegraph-road ! org>
Date: 2007-03-23 14:03:44
Message-ID: 200703231503.44165.glaurent () telegraph-road ! org
[Download RAW message or body]
On Friday 23 March 2007 12:05, Olivier Goffart wrote:
> Le vendredi 23 mars 2007, Guillaume Laurent a écrit :
> > I think this enum should be replaced by a simple bool. As it is, it
> > doesn't make the API any clearer than a simple bool would (given the arg
> > is named 'reverse').
>
> Wrong, it make reading the code easier. And we're trying to avoid such
> bool in our API. Read the following two docs :
> http://doc.trolltech.com/qq/qq13-apis.html#thebooleanparametertrap
> http://techbase.kde.org/Policies/Library_Code_Policy#Flags
I agree on principle, but I think this one warrants for an exception. This
method is really meant to be called from a signal, and putting such a type in
the signal's signature would be very cumbersome (and using 'alien' types in
signal/slots is discouraged).
So no matter how you turn it, you will see and use this method with a bool arg
at the application level.
--
Guillaume.
http://telegraph-road.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic