KStyle changes

Maksim Orlovich mo85 at cornell.edu
Wed May 9 18:40:26 BST 2007


> On Wednesday 09 May 2007, Alex Merry wrote:
>>          /// Represent as an int to store as a property
>> -        operator int() const
>> -        {
>> -            return int(role) | int(mode);
>> -        }
>> +        operator int() const;
>
> This could be replaced with a proper Q_DECLARE_FLAGS and
> Q_DECLARE_OPERATORS_FOR_FLAGS, I think?

It's not really a flag collection, so IMHO no. You don't | these things,
etc. -- just encode/decode them, and call some methods to construct a
QColor from them.

>
> Overall, I wonder if that ColorMode thing (just a glorified enum, right)
> is worth a Private class.

It should absolutely not have one. The class is basically used for
interpreting color information in internal data structures, and because of
that it really can't possibly store more than 32-bits worth of
information; and it has 64 bits to do that, all of POD data.

Uninlining OTOH is probably a good idea (as adding a d-pointer for future
extension in KStyle)






More information about the kde-core-devel mailing list