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

List:       kde-commits
Subject:    Re: branches/work/kde4/kdelibs/kdecore
From:       Lars Knoll <lars () trolltech ! com>
Date:       2005-05-12 18:32:50
Message-ID: 200505122032.51107.lars () trolltech ! com
[Download RAW message or body]

On Thursday 12 May 2005 20:19, Mickael Marchand wrote:
> SVN commit 412813 by marchand:
>
> ok, this one is really a brain killer ;)
>
> I am disabling the functionality of loading a QTextCodec from a charmap (if
> Qt does not know anything about this charmap) I leave that to Lars who
> probably knows a lot more than me here ;)

I'm not 100% sure, but we can probably get rid of most (if not all) of 
kcharsets for KDE 4. 

Qt4's text codecs now provides aliases, which was the main think kcharsets was 
used for afaik. It e.g. now also recognises "latin1" or "iso-ir-100" or 
"cp819" as names for the "iso8859-1" codec.

Cheers,
Lars

>
> now we have to drop the Q3AsciiDict that prevents compilation apparently
> (because it wants to delete QTextCodecs which can't be deleted apparently)
> ...
>
>
>
>  M  +8 -1      branches/work/kde4/kdelibs/kdecore/kcharsets.cpp
>
>
> --- branches/work/kde4/kdelibs/kdecore/kcharsets.cpp #412812:412813
> @@ -307,6 +307,7 @@
>      { "mac", "apple roman" },
>      { 0, 0 }};
>
> +#if 0
>  // some different names for the encodings defined in the charmaps files.
>  // even though the charmap file names are all uppercase, the names are all
> lowercase here. static struct Aliases
> @@ -334,8 +335,8 @@
>      { "koi8-r", "iso-8859-5" },
>      { "koi8-u", "koi8-r" },
>      { 0, 0 }};
> +#endif
>
> -
>  // search an array of items index/data, index is const char*, data is T,
> find first matching index // and return data, or return 0
>  template< typename T, typename Data >
> @@ -602,6 +603,11 @@
>          return codec;
>      }
>
> +#warning is it still usefull with Qt4 ?
> +	//dont forget to remove the #if 0 on the 2 structs at the top also if you
> reenable that;) +	//from what I understood, one needs to create a
> QTextCodecPlugin in order to be able to support a new Codec, but I do not
> +	//know how to convert a charmap to a QTextCodec and the real big question
> is whether we need that at all ...  (mikmak) +#if 0
>      // ### TODO: charmaps have changed a little since this code was
> written. The default dir should be changed and KFilterDev should be used
> for reading gzipped files. QString dir;
>      {
> @@ -637,6 +643,7 @@
>          d->codecForNameDict.replace(key, codec);
>          return codec;
>      }
> +#endif
>
>      // could not assign a codec, let's return Latin1
>      ok = false;
[prev in list] [next in list] [prev in thread] [next in thread] 

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