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

List:       kde-core-devel
Subject:    Re: [PATCH] Add select encoding in Control Center (for CVS HEAD)
From:       Ilya Konstantinov <kde-core-devel () future ! shiny ! co ! il>
Date:       2001-09-28 17:06:01
[Download RAW message or body]

On Sat, Sep 29, 2001 at 01:22:28AM +0900, Toshitaka Fujioka wrote:
> I remade a patch. Please review.

You still compare the encoding names in loadCurrentEncoding() with
contains(). How about the way I proposed in my previous message?

I meant something like:

QTextCodec *currentCodec = QTextCodec::codecForName(encoding);
int count = 0;
QStringList encodings = KGlobal::charsets()->availableEncodingNames();
QStringList::Iterator it;
for( it = encodings.begin(); it != encodings.end(); ++it ) {
   QTextCodec *codec = KGlobal::charsets()->codecForName(*it);
   if (qstrcmp(codec->name(), currentCodec->name()) == 0)
     return count;
   count++;
}

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

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