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

Thiago Macieira thiago.macieira at intel.com
Fri Jan 25 01:26:57 CET 2013


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?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130124/ea74f0e6/attachment.sig>


More information about the Interest mailing list