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

List:       kde-core-devel
Subject:    Re: fromLatin1 in KConfig::writeEntry
From:       Hans Petter Bieker <bieker () stud ! ntnu ! no>
Date:       2000-04-28 7:58:44
[Download RAW message or body]

On Fri, 28 Apr 2000 pbrown@redhat.com wrote:

> kpropsdlg contains quite a lot of fromLatin1 on the keys it uses to
> read/write to its KConfig entries.  This seems incorrect and nothing else
> is doing this.  Shall I remove these calls?

QString::fromLatin1() does that same as QString(). Then reason why they
was added was to find out if the code was doing something wrong. For
instance I found this:

QString::fromLatin1(user->pw_name)

Accoring to TT this should be QFile::decodeName(user->pw_name). This
means that the username only can be in latin1. That might not be that
bad, but for other fields it might. If you replace it with QString() you
will have to remove QT_NO_CAST_ASCII from the makefile.

BTW: That code looks OK and you could remove it. Perhaps the
QString::fromLatin1(user_something) parts should be fixed.

-bieker-

Norwegian University of Science and Technology, Engineering Cybernetics
                 bieker@stud.ntnu.no / bieker@kde.org

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

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