KMessage/KMessageHandler: a core/ui seperation for displaying message.

Ingo Klöcker kloecker at kde.org
Mon May 29 01:15:19 BST 2006


On Sunday 28 May 2006 23:14, Thiago Macieira wrote:
> Michaël Larouche wrote:
> >> IIRC, values don't need to be OR'able in order to be used by
> >> QFlags. Just the proper Q_DECLARE_FLAGS( MessageTypes, MessageType
> >> ) macro needs to be used instead. AFAIK, "typedef
> >> QFlags<MessageType> MessageTypes;" is less correct.
> >
> >I prefer Q_DECLARE_FLAGS myself.
> >
> >KMessage doesn't offer many possibilies so I don't see why I should
> >overengineer it to check for capability of the handler.
>
> Indeed. It makes no sense to have a message that is at the same time
> a Fatal and a Debug message.

Frans point was that someone might want to do something like
  if ( messagetype & ( Debug | Fatal ) )
instead of
  if ( messagetype == Debug || messagetype == Fatal )

Not that the latter would become overly complicated given the fact that 
we only have four (?) different types.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060529/89541e9e/attachment.sig>


More information about the kde-core-devel mailing list