For me it looks like someone in Qt team (senior enough) decided that for compatibility reasons wchar_t always should be unsigned char, most other libs think that compiler writers (and developers) are smart enough to know what is better for them.

As for compatibility with other libraries, it's usually not a problem until you use any method with wchar_t. In a past I used boos with qt, but in these days is much harder, because now wchar_t is much more popular then it was 5 years ago.
Anyway it would really interesting to read a research paper about compatibility problems with native wchar_t in different compilers on different platforms (I hope there is such, as else it would be just wild guess and give people many difficult hours of trying solve what isn't broken).



Quote Originally Posted by fsmoke View Post
no - you don't want understand me at all . Qt ported on many platforms - and every platform have own specifics, but no differences between wchar_t and unsigned short - on WINDOWS. My question is: Why Qt not using built-in wchar_t on windows and use frustrated define wchar_t to unsigned short - on windows sizeof unsigned short and built-in wchar_t are both 2 bytes. No reason using this compiler flag on windows - it's no differences. And this question is not question of portability at all. It's no need to change source code at all.



I can't understand - I already wrote to you in previous post: try to use boost file system, for example, with Qt app - you got link errors(about different wchar_t types). Besides I post to you link to stackoverflow.com- proof that problem exists.



When project consists of many libraries - and some of them periodically updated - so when you download new version you must change configs, makefiles and so on (and then rebuild) to link it with Qt application. So YES it's problem sometimes!
Problem at empty place!!!

Besides I didn't see any library (except Qt) which uses this flag.

PS
Your status is Master of Zen - Why I tell you trivial things. If you think I am new in Qt or c++ - you are wrong - I have about 12 years expirience in cpp. I am senior and team lead - just for information.