mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Unneeded Qt dependency


From: Nikos Chantziaras
Subject: Re: [Mingw-cross-env-list] Unneeded Qt dependency
Date: Tue, 28 Jun 2011 23:31:42 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110624 Thunderbird/3.1.11

On 06/28/2011 10:57 PM, Mark Brand wrote:
In the *.pro file:

QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs

And somewhere in the program sources:

#include <QtPlugin>
Q_IMPORT_PLUGIN(qcncodecs)
Q_IMPORT_PLUGIN(qjpcodecs)
Q_IMPORT_PLUGIN(qtwcodecs)
Q_IMPORT_PLUGIN(qkrcodecs)

But I'm wondering about alternatives:

Maybe there is a way to make Qt to use iconv even on Windows.

Qt does not use iconv for charset conversions even on Unix, actually. At least not for all of them. It only uses it for the current Unix locale. On Windows, there isn't a "current Unix locale". So there is no use for it.

I didn't look at the Qt sources myself, but I trust that Thiago Macieira, one of Nokia's Qt lead devs, knows what he's talking about :-P


Also, do you have a minimal example showing where a text conversion only
works when with -no-iconv?

I've rebuilt everything with vanilla mingw-cross-env in order to test properly (my version is *heavily* modified, including patches (even for modifying binutils to do dead-code stripping) and lots of configuration changes.) It seems it works just fine even without -no-iconv. So the non-working QTextCodec does not appear with default mingw-cross-env.

However, I cannot explain why. The docs clearly mention that to use the charset conversion plugins in static builds, you have to explicitly include them. Why they work regardless if you build with '-iconv" is a mystery to me, since iconv is not actually used for anything on Windows.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]