[Interest] Porting to Qt5/macx-xcode Mountain Lion

Joshua Grauman jnfo-c at grauman.com
Fri Jan 25 01:39:39 CET 2013


Ok, got it. That makes way more sense. Sorry for being slow. I'll take a 
look and let you know if I can find any more information.

Josh

> On quinta-feira, 24 de janeiro de 2013 16.20.37, Joshua Grauman wrote:
>> I'm not sure I completely understand your question, but I'll give it a
>> shot. I had a global variable as follows (bad style, I know). It seems
>> pointless I know, but it's because I also have other custom
>> implementations of QTextCodec that get instantiated right next to it, so I
>> just put them all together.
>>
>> QTextCodec *Ecodec = QTextCodec::codecForName("UTF-8");
>>
>> So since this was a global variable, it gets called before
>> QCoreApplication, and I'm assuming that's why it returns 0. Does that
>> help?
>
> No, because you had already told me that :-)
>
> I know it returns 0. Your hypothesis is that it returns 0 because it was
> called before QCoreApplication was initialised, which you've been able to
> prove to be the case. But I looked at the code and, at first glance, there was
> nothing to indicate why that would be the behaviour.
>
> What I want to know is why that behaviour is so. Where, in the code inside Qt,
> does it make a decision that gets it a null, instead of the proper codec?
>
>



More information about the Interest mailing list