[webkit-qt] wchar_t not treated as built-in type on Windows?
benedikte.holm at nokia.com
benedikte.holm at nokia.com
Mon Feb 21 03:12:05 PST 2011
Hi,
>
> Hello,
>
> On 2/18/2011 2:09 AM, ext Baldeva, Arpit wrote:
> >
> > Hi,
> >
> > I noticed in the visual studio settings of the QtWebKit project that
> > "Treat wchar_t as Built-in Type" is set to false. Is this a
> > requirement? Would it be safe to change it (locally)?
> >
>
> It might be set to false voluntarily, but it's also possible that qmake
> isn't generating the .vcproj files with the right default value.
>
> > I did some search and it seemed like people recommended rebuilding
> > whole Qt framework with wchar_t supported as built-in type in order
> > for it to work. Just for the kicks, I changed the QtWebKit project to
> > recognize wchar_t as built-in type and rebuilt it (Did not build whole
> > Qt framework) and it built and ran fine. But I am not sure if I have
> > overlooked something here.
> >
>
> QtWebKit only uses public API from the rest of Qt and wchar_t isn't
> exposed in any Qt API class as far as I know, so it shouldn't be a
> problem for binary compatibility and it's very possible that it's not
> necessary to rebuild Qt.
>
Qt has this flag set to false by default, but you can change it by following the guide here:
http://developer.qt.nokia.com/faq/answer/how_can_i_make_my_qt_application_use_wchar_t_instead_of_wchar_t
To be sure that it's safe you should turn it on for Qt too if you have turned it on for QtWebKit.
You might not end up in trouble if you don't, but if your app uses QString::fromWCharArray() then it may fail.
Unfortunately we cannot turn it on for Qt 4.8 as that would break binary compatibility for us.
(Because this is a VS specific flag, based on my previous experience in Qt Support I would encourage you to make sure they are compatible. MS are notorious at breaking BC ;-))
Cheers,
Benedikte Holm
More information about the webkit-qt
mailing list