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

List:       kde-core-devel
Subject:    Re: KCharsets bug
From:       Lars Knoll <lars () trolltech ! com>
Date:       2000-09-06 11:16:38
[Download RAW message or body]

On Wed, 06 Sep 2000, Dirk Mueller wrote:
> Moin David!
>
> > Got the same today.
> > This fixes it for me:
>
> which looks wrong to me. Below corrected version:
>
>  {
>      QFont::CharSet cs = nameToID(charset);
> -    return cs == QFont::AnyCharSet ? false : cs;
> +    return cs == QFont::AnyCharSet ? false : isAvailable(cs);
>  }
>
>
> however I don't understand why this QFont::AnyCharset check has been
> entered into one version of isAvailable but not the other. Looks a
> bit bogus to me. Lars ?

No, not really. QFont::AnyCharset is always available. The one version checks 
if a QFont::CharSet is available. The other one checks if a chartset with 
name "mycharset" is available. A charset with name "koi5-r" for example will 
return false, because such a charset doesn't exist. You can't do such things
with the enum.

Lars

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

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